Skip to content

Commit

Permalink
Also create next task when task is closed as obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
ad-si committed May 14, 2024
1 parent d009274 commit 959bdfe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasklite-core/source/Lib.hs
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,14 @@ endTasks conf connection noteWordsMaybe ids = do
<+> prettyId
<+> "is already marked as obsolete"
else do
logMessageMaybe <-
if isJust task.repetition_duration
then createNextRepetition conf connection task
else
if isJust task.recurrence_duration
then createNextRecurrence conf connection task
else pure Nothing

noteMessageMaybe <- case noteWordsMaybe of
Nothing -> pure Nothing
Just noteWords ->
Expand All @@ -1006,6 +1014,7 @@ endTasks conf connection noteWordsMaybe ids = do
<+> prettyId
<+> "as obsolete"
)
<> fromMaybe "" (logMessageMaybe <&> (hardline <>))

pure $ vsep docs

Expand Down

0 comments on commit 959bdfe

Please sign in to comment.