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
...
```

This will be tracked as:
```
01:00 - 02:00 <TASK 123 TAGS> "First draft"
03:00 - 04:00 <TASK 123 TAGS> "Second iteration"
05:00 - 06:00 <TASK 123 TAGS> "Bugfixing"
```
  • Loading branch information
fdcds authored and lauft committed Mar 3, 2025
1 parent 234fbd1 commit 618bd5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions on_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ def extract_tags_from(json_obj):
else:
tags.extend(json_obj['tags'])

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

return tags


Expand Down

0 comments on commit 618bd5e

Please sign in to comment.