Bug Fix
- Deleting a task no longer clobbers any recorded end date (thanks to Seneca Cunningham).
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -46,4 +46,5 @@ Thanks to the following, who submitted detailed bug reports and excellent sugges
|
|||||||
Joe Pulliam
|
Joe Pulliam
|
||||||
Juergen Daubert
|
Juergen Daubert
|
||||||
Rich Mintz
|
Rich Mintz
|
||||||
|
Seneca Cunningham
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
+ Updated task-faq.5 man page.
|
+ Updated task-faq.5 man page.
|
||||||
+ The 'edit' command now conveniently fills in the current date for new
|
+ The 'edit' command now conveniently fills in the current date for new
|
||||||
annotations.
|
annotations.
|
||||||
|
+ Deleting a task no longer clobbers any recorded end date (thanks to
|
||||||
|
Seneca Cunningham).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -943,7 +943,12 @@ int handleDelete (std::string &outs)
|
|||||||
sibling->get ("uuid") == parent)
|
sibling->get ("uuid") == parent)
|
||||||
{
|
{
|
||||||
sibling->setStatus (Task::deleted);
|
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);
|
context.tdb.update (*sibling);
|
||||||
|
|
||||||
if (context.config.getBoolean ("echo.command"))
|
if (context.config.getBoolean ("echo.command"))
|
||||||
@@ -962,7 +967,11 @@ int handleDelete (std::string &outs)
|
|||||||
task->setStatus (Task::deleted);
|
task->setStatus (Task::deleted);
|
||||||
updateRecurrenceMask (all, *task);
|
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);
|
context.tdb.update (*task);
|
||||||
|
|
||||||
out << "Deleting recurring task "
|
out << "Deleting recurring task "
|
||||||
@@ -976,7 +985,12 @@ int handleDelete (std::string &outs)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
task->setStatus (Task::deleted);
|
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);
|
context.tdb.update (*task);
|
||||||
|
|
||||||
if (context.config.getBoolean ("echo.command"))
|
if (context.config.getBoolean ("echo.command"))
|
||||||
|
|||||||
Reference in New Issue
Block a user