taskwarrior
taskwarrior copied to clipboard
Hooks fail during the 'fix dependency chain' operation
Assume a simple dependency chain A -> B -> C.
Usually when you mark B as done, you are given an option to repair the dependency chain; if you say yes, you would get A -> C.
However, with a hook enabled that doesn't touch dependencies at all (just returns the JSON given into it) I get an error:
Could not delete a dependency on task 0 - not found.
The error seems to happen when processing the task now marked as 'done':
Completed task d65e3fae 'fee'.
Unblocked 4549 'bar'.
Task d65e3fae-c8d9-4cb7-bcbb-baeabd273455 is blocked by:
4548 foo
and is blocking:
4549 bar
Would you like the dependency chain fixed? (yes/no) yes
...
UUID/ID argument found '4550', not applying context.
Found hook script /home/hearth/.task/hooks/on-add-new.nu
Found hook script /home/hearth/.task/hooks/on-modify-new.nu
Filtered 4550 tasks --> 1 tasks [pending only]
Hook: Calling /home/hearth/.task/hooks/on-modify-new.nu
Hook: input
{"description":"fee","entry":"20250610T154316Z","modified":"20250610T154328Z","priority":"M","status":"pending","uuid":"d65e3fae-c8d9-4cb7-bcbb-baeabd273455","tags":["test"],"depends":["c276e9c4-8012-45a9-9ea6-25d211560e5c"]}
{"description":"fee","end":"20250610T155007Z","entry":"20250610T154316Z","modified":"20250610T155007Z","priority":"M","status":"completed","uuid":"d65e3fae-c8d9-4cb7-bcbb-baeabd273455","tags":["test"],"depends":["c276e9c4-8012-45a9-9ea6-25d211560e5c"]}
Hooks: args
api:2
args:/usr/bin/task rc:/home/hearth/.task/.taskrc rc.debug.hooks=2 4550 done
command:done
rc:/home/hearth/.task/.taskrc
data:/home/hearth/.task
version:3.4.1
Timer Hooks::execute (/home/hearth/.task/hooks/on-modify-new.nu) 0.006790 sec
Hook: output
{"description":"fee","end":"20250610T155007Z","entry":"20250610T154316Z","modified":"20250610T155007Z","priority":"M","status":"completed","uuid":"d65e3fae-c8d9-4cb7-bcbb-baeabd273455","tags":["test"],"depends":["c276e9c4-8012-45a9-9ea6-25d211560e5c"]}
Hook: Completed with status 0
TASKRC override: /home/hearth/.task/.taskrc
Configuration override rc.debug.hooks=2
Could not delete a dependency on task 0 - not found.
Expected behaviour would be that this input is accepted and it continues to the next operation (which is presumably to update the dependency in the task that originally depended on our d65e3fae here to now depend on c276e9c4.)