mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-31 17:03:30 +02:00
Bug Fix
- Deleting a task no longer clobbers any recorded end date (thanks to Seneca Cunningham).
This commit is contained in:
parent
ac431ac5c9
commit
38d82f6564
3 changed files with 20 additions and 3 deletions
|
@ -943,7 +943,12 @@ int handleDelete (std::string &outs)
|
|||
sibling->get ("uuid") == parent)
|
||||
{
|
||||
sibling->setStatus (Task::deleted);
|
||||
sibling->set ("end", endTime);
|
||||
|
||||
// Don't want a 'delete' to clobber the end date that may have
|
||||
// been written by a 'done' command.
|
||||
if (! sibling->has ("end"))
|
||||
sibling->set ("end", endTime);
|
||||
|
||||
context.tdb.update (*sibling);
|
||||
|
||||
if (context.config.getBoolean ("echo.command"))
|
||||
|
@ -962,7 +967,11 @@ int handleDelete (std::string &outs)
|
|||
task->setStatus (Task::deleted);
|
||||
updateRecurrenceMask (all, *task);
|
||||
|
||||
task->set ("end", endTime);
|
||||
// Don't want a 'delete' to clobber the end date that may have
|
||||
// been written by a 'done' command.
|
||||
if (! task->has ("end"))
|
||||
task->set ("end", endTime);
|
||||
|
||||
context.tdb.update (*task);
|
||||
|
||||
out << "Deleting recurring task "
|
||||
|
@ -976,7 +985,12 @@ int handleDelete (std::string &outs)
|
|||
else
|
||||
{
|
||||
task->setStatus (Task::deleted);
|
||||
task->set ("end", endTime);
|
||||
|
||||
// Don't want a 'delete' to clobber the end date that may have
|
||||
// been written by a 'done' command.
|
||||
if (! task->has ("end"))
|
||||
task->set ("end", endTime);
|
||||
|
||||
context.tdb.update (*task);
|
||||
|
||||
if (context.config.getBoolean ("echo.command"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue