mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Recurrence: Updated 'until' handling
This commit is contained in:
parent
ce012d6430
commit
05979025d2
1 changed files with 10 additions and 5 deletions
|
@ -355,13 +355,18 @@ void handleUntil ()
|
||||||
auto tasks = context.tdb2.pending.get_tasks ();
|
auto tasks = context.tdb2.pending.get_tasks ();
|
||||||
for (auto& t : tasks)
|
for (auto& t : tasks)
|
||||||
{
|
{
|
||||||
|
// TODO What about expiring template tasks?
|
||||||
if (t.getStatus () == Task::pending &&
|
if (t.getStatus () == Task::pending &&
|
||||||
t.has ("until") &&
|
t.has ("until"))
|
||||||
Datetime (t.get_date ("until")) < now)
|
|
||||||
{
|
{
|
||||||
t.setStatus (Task::deleted);
|
auto until = Datetime (t.get_date ("until"));
|
||||||
context.tdb2.modify(t);
|
if (until < now)
|
||||||
context.footnote (onExpiration (t));
|
{
|
||||||
|
context.debug (format ("handleUntil: recurrence expired until {1} < now {2}", until.toISOLocalExtended (), now.toISOLocalExtended ()));
|
||||||
|
t.setStatus (Task::deleted);
|
||||||
|
context.tdb2.modify(t);
|
||||||
|
context.footnote (onExpiration (t));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue