-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve taskwarrior hooks #329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, please address the comments in the code before this PR can be merged.
And please accept the DCO by signing your commits.
ext/on-modify.timewarrior
Outdated
|
||
# Started task. | ||
if 'start' not in old: | ||
subprocess.call(['timew', 'start', start] + new_tags + [':yes', ':adjust']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: Do we really need the :adjust
hint here? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a separate hint: The adjust hint bears the problem that changing a start date towards the past might accidentally delete other intervals, at the same time if you have two intervas back to back and you want to move the start time of the latter one back, it should do that without complaining.
Idea:
- rename "adjust" to "override"
- create a new hint called "adjust" that will adjust intervals, but will refuse to delete them in the process
That seems pretty intuitive to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into the signing at some point - currently I am happy if I get even the code to a satisfactory level. |
Looking good, I have even written a test script to verify and document expected functionality. Implementing the alternate adjust hint specification as commented above would make this perfect as far as I have seen :) |
Signed-off-by: xerus2000 <[email protected]>
Signed-off-by: xerus2000 <[email protected]>
Signed-off-by: xerus2000 <[email protected]>
Signed-off-by: xerus2000 <[email protected]>
Signed-off-by: xerus2000 <[email protected]>
Signed-off-by: xerus2000 <[email protected]>
@lauft would appreciate your stance regarding my suggestion :) |
Migrated to GothenburgBitFactory/task-timewarrior-hook#11 Please continue any discussion of this PR there. |
Fixes GothenburgBitFactory/task-timewarrior-hook#13, GothenburgBitFactory/task-timewarrior-hook#16