diff --git a/ChangeLog b/ChangeLog index 7bcb7f29e..058915883 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ - TW-1578 Bash tab completion problems on first run (thanks to Renato Alves and Ptolemarch). +- TW-1580 "modified" attribute no longer updated (thanks to David Patrick). - Setting 'bulk' to zero is interpreted as infinity, which means there is no amount of changes that is considered dangerous (thanks to Tomas Babej). diff --git a/src/TDB2.cpp b/src/TDB2.cpp index 579090b77..ab56a9683 100644 --- a/src/TDB2.cpp +++ b/src/TDB2.cpp @@ -598,7 +598,7 @@ void TDB2::update ( const std::string& uuid, Task& task, const bool add_to_backlog, - const bool addition) + const bool addition /* = false */) { // Validate to add metadata. task.validate (false); @@ -607,6 +607,13 @@ void TDB2::update ( Task original; if (not addition && get (task.get ("uuid"), original)) { + if (add_to_backlog) + { + // All locally modified tasks are timestamped, implicitly overwriting any + // changes the user or hooks tried to apply to the "modified" attribute. + task.setAsNow ("modified"); + } + // Update the task, wherever it is. if (!pending.modify_task (task)) completed.modify_task (task);