TI-51: in the taskwarrior hook, deleting a task doesn't stop the watch

- Thanks to Mattia Rizzolo.
This commit is contained in:
Paul Beckingham 2016-11-05 11:57:15 -04:00 committed by Thomas Lauf
parent 2de2ecd440
commit 5d91528598

View file

@ -63,3 +63,10 @@ if 'start' in new and not 'start' in old:
elif not 'start' in new and 'start' in old:
os.system('timew stop ' + combined + ' :yes')
# TI-51 - in the taskwarrior hook, deleting a task doesn't stop the watch
#
# Broadened to: Any task that is active, with a non-pending status should not
# be tracked.
elif 'start' in new and new['status'] != 'pending':
os.system('timew stop ' + combined + ' :yes')