mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
recur: Remove WIP recurrence overhaul implementation
The feature has been moved to 3.0 milestone. Also, we are now using feature branches for development of new functionality, in order to make the development branch more stable.
This commit is contained in:
parent
7011cfb05a
commit
4db7990df8
3 changed files with 25 additions and 374 deletions
|
@ -412,3 +412,27 @@ void updateRecurrenceMask (Task& task)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Delete expired tasks.
|
||||
void handleUntil ()
|
||||
{
|
||||
Datetime now;
|
||||
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
|
||||
for (auto& t : tasks)
|
||||
{
|
||||
// TODO What about expiring template tasks?
|
||||
if (t.getStatus () == Task::pending &&
|
||||
t.has ("until"))
|
||||
{
|
||||
auto until = Datetime (t.get_date ("until"));
|
||||
if (until < now)
|
||||
{
|
||||
Context::getContext ().debug (format ("handleUntil: recurrence expired until {1} < now {2}", until.toISOLocalExtended (), now.toISOLocalExtended ()));
|
||||
t.setStatus (Task::deleted);
|
||||
Context::getContext ().tdb2.modify(t);
|
||||
Context::getContext ().footnote (onExpiration (t));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue