From 5d91528598ddb3c05b92956f60d739f5327da9b3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 5 Nov 2016 11:57:15 -0400 Subject: [PATCH] TI-51: in the taskwarrior hook, deleting a task doesn't stop the watch - Thanks to Mattia Rizzolo. --- on-modify.timewarrior | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/on-modify.timewarrior b/on-modify.timewarrior index 3dfd990..08a640f 100755 --- a/on-modify.timewarrior +++ b/on-modify.timewarrior @@ -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') +