GothenburgBitFactory / GothenburgBitFactory/taskwarrior

[TW-1507] Input warnings are processed before hooks

Open
#1,533 3 comments 0 reactions 0 assignees View on GitHub
type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

_Tomas Babej on 2015-01-13T09:49:27Z says:_

It seems that parts of input validation are performed on the hook-unmodified input, which is incorrect.

I have a hook which sets default due time for dates from 00:00:00 to 22:00:00. Consider following example:

```
[$ tbabej] task add test due:2015-01-13 wait:2015-01-13T21:00:00
Created task 1.
Warning: You have specified that the 'wait' date is after the 'due' date.
Default due time has been set.

[$ tbabej] task 1 info

Name Value
ID 1
Description test
Status Waiting
Entered 2015-01-13 10:41:44 (4 seconds)
Waiting until 2015-01-13 21:00:00
Due 2015-01-13 22:00:00
Last modified 2015-01-13 10:41:44 (4 seconds)
UUID 59144e7e-b137-4ea5-854c-945c92e27197
Urgency 5.585
waiting 1 * -3 = -3
due 0.715 * 12 = 8.58
```

Obviously, the warning should not appear, as wait time < due time. This issue might affect other checks or errors.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.