Skip to content

Commit

Permalink
on-modify.timewarrior: Seprate hierarchical projects as individual tags
Browse files Browse the repository at this point in the history
This will seprate a hierarchical project `job.projectA.sprint4` into
individual 3 tags `[job,projectA,sprint4]`.

This will allow flexibility for view reports in timewarrior.

Signed-off-by: Sandeep Sahani <[email protected]>
  • Loading branch information
sylveryte authored and lauft committed Mar 3, 2025
1 parent 234fbd1 commit 484a24b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion on_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ def extract_tags_from(json_obj):
tags = [json_obj['description']]

if 'project' in json_obj:
tags.append(json_obj['project'])
for project in json_obj['project'].split('.'):
tags.append(project)

if 'tags' in json_obj:
if type(json_obj['tags']) is str:
Expand Down

0 comments on commit 484a24b

Please sign in to comment.