From ffc0f468654d0c1894e52418470479d163c23e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Mon, 2 May 2022 12:16:07 -0400 Subject: [PATCH] Default Leads project subprojects ('tasks') to 'Leads' not 'Development' --- pomodoro_to_harvest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 690573b..3dba63a 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -231,6 +231,11 @@ for preferred, alternatives in subproject_names.items(): # TODO flag when task/subproject names are not known, because otherwise they # get force-created on import. +# Default task for Leads project should be 'Leads' (not Development as will be filled in below). +timelog.loc[(timelog.project=="Leads") & timelog.subproject.isna(), "subproject"] = "Leads" +# The above could also have been done in the compound_project_tasks +# Leaving this here as an example. + # Condense duplicate entries by date, summing the minutes spent, and listing # the first started and last recorded times for each task. # The fillna is essential or we drop entries with blank ('None') projects.