[tasks] Add Bug as suffix type

This commit is contained in:
2024-10-15 15:12:58 -04:00
parent 8fb2fac47f
commit f075492554
2 changed files with 7 additions and 0 deletions

View File

@ -344,6 +344,12 @@ def todoist_scrobble_task(todoist_task: dict, user_id: int) -> Scrobble:
if label in TODOIST_TITLE_SUFFIX_LABELS:
suffix = label
if not prefix and suffix:
logger.warning(
"Missing a prefix and suffix tag for task",
extra={"todoist_task": todoist_task},
)
title = " ".join([prefix.capitalize(), suffix.capitalize()])
task = Task.find_or_create(title)

View File

@ -1,5 +1,6 @@
TODOIST_TITLE_PREFIX_LABELS = ["work", "home", "personal"]
TODOIST_TITLE_SUFFIX_LABELS = [
"bug",
"project",
"errand",
"chores",