mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TW-1432: start/stop can be issued on completed tasks
- Make "start" set status to pending from completed/deleted. - Add test to "start_NEW.t", which is to be combined with start.t once converted from Perl.
This commit is contained in:
parent
9e20f83f24
commit
5f61703588
2 changed files with 69 additions and 0 deletions
|
@ -79,6 +79,13 @@ int CmdStart::execute (std::string& output)
|
|||
task.modify (Task::modAnnotate);
|
||||
task.setAsNow ("start");
|
||||
|
||||
Task::status status = task.getStatus ();
|
||||
if (status == Task::completed || status == Task::deleted)
|
||||
{
|
||||
// "waiting" handled by Task::validate(), no special care needed here.
|
||||
task.setStatus (Task::pending);
|
||||
}
|
||||
|
||||
if (context.config.getBoolean ("journal.time"))
|
||||
task.addAnnotation (context.config.get ("journal.time.start.annotation"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue