]> git.madduck.net Git - etc/taskwarrior.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

TaskWarrior: Enforce recurrent tasks upon each evaluation of filter
authorTomas Babej <tomasbabej@gmail.com>
Sat, 7 Feb 2015 11:19:41 +0000 (12:19 +0100)
committerTomas Babej <tomasbabej@gmail.com>
Sat, 7 Feb 2015 11:19:41 +0000 (12:19 +0100)
tasklib/task.py

index 2a51b353e2ebe3980cb011d5f6cd0e373a40f0e2..51c97d31736dc0a9e3d6aa631f940c3e6fae2344 100644 (file)
@@ -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):