Permalink
Browse files

Postponing should actually work for overdue tasks too

  • Loading branch information...
1 parent ccb3bdd commit b174e544c05c541b760dee3f4ccdada10033d900 @samstokes committed Oct 1, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 Model.hs
View
@@ -112,7 +112,9 @@ estimateOptions = [2 ^ x | x <- [0 .. 4]]
postponeTask :: PersistBackend SqlPersist m => (TaskId, Task) -> SqlPersist m ()
-postponeTask (taskId, task) = update taskId [TaskScheduledFor =. tomorrow (taskScheduledFor task)]
+postponeTask (taskId, task) = do
+ now <- liftIO getCurrentTime
+ update taskId [TaskScheduledFor =. tomorrow now]
activateTask :: PersistBackend SqlPersist m => UTCTime -> TaskId -> SqlPersist m ()

0 comments on commit b174e54

Please sign in to comment.