mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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 != "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue