mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Update "modified" on modification
This commit is contained in:
parent
a1b64a05ba
commit
6cd5bf1237
3 changed files with 17 additions and 1 deletions
|
@ -133,6 +133,9 @@ void TDB2::add (Task& task)
|
|||
// they have been unmodified for a long time.
|
||||
void TDB2::modify (Task& task)
|
||||
{
|
||||
// All locally modified tasks are timestamped, implicitly overwriting any
|
||||
// changes the user or hooks tried to apply to the "modified" attribute.
|
||||
task.setAsNow ("modified");
|
||||
task.validate (false);
|
||||
auto uuid = task.get ("uuid");
|
||||
|
||||
|
|
|
@ -1826,7 +1826,7 @@ void Task::validate (bool applyDefault /* = true */)
|
|||
if ((status == Task::pending) && (get ("end") != ""))
|
||||
remove ("end");
|
||||
|
||||
// Provide an entry date unless user already specified one.
|
||||
// Provide a modified date unless user already specified one.
|
||||
if (! has ("modified") || get ("modified") == "")
|
||||
setAsNow ("modified");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue