mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-01 11:20:19 +02:00
Feature: scheduled date
- Supports 'scheduled' date for tasks, which represent the earliest opportunity to work on a task. - Added unit tests for urgency. - Implemented color rule. - Added scheduled to 'info' report. - Updated assorted documentation. - Removed comments in default rc because they are never seen. - Added (broken) 'ready' report, which is like 'next' but only for ready tasks.
This commit is contained in:
parent
d08f189769
commit
98f215b1b5
17 changed files with 308 additions and 91 deletions
|
@ -159,6 +159,7 @@ std::string CmdEdit::formatTask (Task task)
|
|||
<< " Created: " << formatDate (task, "entry") << "\n"
|
||||
<< " Started: " << formatDate (task, "start") << "\n"
|
||||
<< " Ended: " << formatDate (task, "end") << "\n"
|
||||
<< " Scheduled: " << formatDate (task, "scheduled") << "\n"
|
||||
<< " Due: " << formatDate (task, "due") << "\n"
|
||||
<< " Until: " << formatDate (task, "until") << "\n"
|
||||
<< " Recur: " << task.get ("recur") << "\n"
|
||||
|
@ -344,6 +345,37 @@ void CmdEdit::parseTask (Task& task, const std::string& after)
|
|||
}
|
||||
}
|
||||
|
||||
// scheduled
|
||||
value = findValue (after, "\n Scheduled:");
|
||||
if (value != "")
|
||||
{
|
||||
if (task.get ("scheduled") != "")
|
||||
{
|
||||
Date original (task.get_date ("scheduled"));
|
||||
std::string formatted = original.toString (context.config.get ("dateformat"));
|
||||
|
||||
if (formatted != value)
|
||||
{
|
||||
context.footnote (STRING_EDIT_SCHED_MOD);
|
||||
task.set ("scheduled", value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
context.footnote (STRING_EDIT_SCHED_MOD);
|
||||
task.set ("scheduled", value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (task.get ("scheduled") != "")
|
||||
{
|
||||
context.footnote (STRING_EDIT_SCHED_DEL);
|
||||
task.setStatus (Task::pending);
|
||||
task.remove ("scheduled");
|
||||
}
|
||||
}
|
||||
|
||||
// due
|
||||
value = findValue (after, "\n Due:");
|
||||
if (value != "")
|
||||
|
|
|
@ -244,6 +244,14 @@ int CmdInfo::execute (std::string& output)
|
|||
view.set (row, 1, Date (task->get_date ("wait")).toString (dateformat));
|
||||
}
|
||||
|
||||
// scheduled
|
||||
if (task->has ("scheduled"))
|
||||
{
|
||||
row = view.addRow ();
|
||||
view.set (row, 0, STRING_COLUMN_LABEL_SCHED);
|
||||
view.set (row, 1, Date (task->get_date ("scheduled")).toString (dateformat));
|
||||
}
|
||||
|
||||
// start
|
||||
if (task->has ("start"))
|
||||
{
|
||||
|
|
|
@ -112,6 +112,7 @@ int CmdShow::execute (std::string& output)
|
|||
" color.pri.M"
|
||||
" color.pri.none"
|
||||
" color.recurring"
|
||||
" color.scheduled"
|
||||
" color.summary.background"
|
||||
" color.summary.bar"
|
||||
" color.sync.added"
|
||||
|
@ -185,6 +186,7 @@ int CmdShow::execute (std::string& output)
|
|||
" taskd.credentials"
|
||||
" undo.style"
|
||||
" urgency.active.coefficient"
|
||||
" urgency.scheduled.coefficient"
|
||||
" urgency.annotations.coefficient"
|
||||
" urgency.blocked.coefficient"
|
||||
" urgency.blocking.coefficient"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue