From: Tomas Babej Date: Sat, 7 Feb 2015 11:19:41 +0000 (+0100) Subject: TaskWarrior: Enforce recurrent tasks upon each evaluation of filter X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/22d4f890a914e0687af63d11b20772d6bf949151?hp=2ef4751c25fbbced996deed6e17bd5bae7a5fdd7 TaskWarrior: Enforce recurrent tasks upon each evaluation of filter --- 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):