From be3cf502835d49b5075ee5d5c1d9d5a9e680f0e8 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 6 Aug 2020 07:14:06 +0000 Subject: [PATCH] C2S: Fix bug: undoC: When deleting TicketResolve, ticketStatus wasn't updated --- src/Vervis/API.hs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index aa552bb..d04c532 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -2133,7 +2133,10 @@ undoC (Entity _pidUser personUser) sharerUser summary audience undo@(Undo uObjec tr <- getJust trid delete trlid delete trid - return $ Just $ ticketResolveTicket tr + let ltid = ticketResolveTicket tr + tid <- localTicketTicket <$> getJust ltid + update tid [TicketStatus =. TSTodo] + return $ Just ltid deleteResolve (Right ractid) = do Entity trrid trr <- MaybeT $ lift $ getBy $ UniqueTicketResolveRemoteActivity ractid lift $ lift $ do @@ -2141,7 +2144,10 @@ undoC (Entity _pidUser personUser) sharerUser summary audience undo@(Undo uObjec tr <- getJust trid delete trrid delete trid - return $ Just $ ticketResolveTicket tr + let ltid = ticketResolveTicket tr + tid <- localTicketTicket <$> getJust ltid + update tid [TicketStatus =. TSTodo] + return $ Just ltid pushCommitsC :: (Entity Person, Sharer)