Skip to content

Commit

Permalink
on-modify.timewarrior: Use last annotation as additional tag, if present
Browse files Browse the repository at this point in the history
This allows the following workflow to be effective and tracked in a useful manner:
```
task 123 start First draft
task 123 stop
...
task 123 start Second iteration
task 123 stop
...
task 123 start Bugfixing
task 123 stop
...
```
  • Loading branch information
fdcds committed Jul 10, 2019
1 parent 966256c commit ec0cb7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/on-modify.timewarrior
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def extract_timew_tags_from(json_obj):
if 'tags' in json_obj:
tags.extend(json_obj['tags'])

if 'annotations' in json_obj:
tags.append(json_obj['annotations'][-1]['description'])

return ' '.join(['"{0}"'.format(tag) for tag in tags]).encode('utf-8').strip()

start_or_stop = ''
Expand Down

0 comments on commit ec0cb7d

Please sign in to comment.