From 22d4f890a914e0687af63d11b20772d6bf949151 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 7 Feb 2015 12:19:41 +0100 Subject: [PATCH 1/1] TaskWarrior: Enforce recurrent tasks upon each evaluation of filter --- tasklib/task.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasklib/task.py b/tasklib/task.py index 2a51b35..51c97d3 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -792,7 +792,15 @@ class TaskWarrior(object): raise TaskWarriorException(error_msg) return stdout.strip().split('\n') + def enforce_recurrence(self): + # Run arbitrary report command which will trigger generation + # of recurrent tasks. + # TODO: Make a version dependant enforcement once + # TW-1531 is handled + self.execute_command(['next'], allow_failure=False) + def filter_tasks(self, filter_obj): + self.enforce_recurrence() args = ['export', '--'] + filter_obj.get_filter_params() tasks = [] for line in self.execute_command(args): -- 2.39.5