GothenburgBitFactory / GothenburgBitFactory/taskwarrior
[TW-1520] Unsuccessful hook terminates whole execution of the task command even if it is a indirect addition
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 423
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 11
Description
_Tomas Babej on 2015-01-20T11:54:49Z says:_
I would swear I thought this worked before, but I can reproduce this on 2.4.0 as well as 2.4.1. This happens with tasks spawned by recurrence:
```
$ task rc.debug.hooks=3
Timer Config::load (/usr/local/share/doc/task/rc/solarized-dark-256.theme) 0.000129 sec
Timer Config::load (/home/tbabej/.taskrc) 0.000876 sec
Found hook script /home/tbabej/.task/hooks/on-add-block-recurrence
Found hook script /home/tbabej/.task/hooks/on-add-date-default-time
Found hook script /home/tbabej/.task/hooks/on-modify-date-default-time
Found hook script /home/tbabej/.task/hooks/on-modify-fix-due-shift
Hooks: Calling /home/tbabej/.task/hooks/on-add-block-recurrence
Hooks: input
{"description":"Wake up at 6.00","due":"20150117T053000Z","entry":"20150120T115630Z","imask":3,"modified":"20150113T115244Z","parent":"5ec829f0-d911-49bb-98ac-c02152c60081","project":"Habits","recur":"1days","status":"waiting","uuid":"ca6bc236-2489-4ed9-9fa1-627c8b0cb6e0","wait":"20150117T043000Z"}
Timer Hooks::execute (/home/tbabej/.task/hooks/on-add-block-recurrence) 0.045781 sec
Hooks: output
Hooks: Completed with status 1
[task next rc.debug.hooks=3]
Configuration override rc.debug.hooks:3
Exiting with unwritten changes to /home/tbabej/.task/pending.data
```
Where as denied addition of the new task should not terminate the report.
Contributor guide
Research direction
Reproduce the recurrence task command with rc.debug.hooks=3 and the shown on-add-block-recurrence hook, then trace the hook execution path that reports status 1. Done means a denied indirect task addition does not terminate the overall report or leave unwritten changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100