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:
@@ -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"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user