From fa7f765e2e7fbd08f53f06fb3f1f2c5fd9d183cd Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 20 Oct 2022 15:41:47 +0000 Subject: [PATCH] DB: Remote Ticket.status field --- src/Vervis/API.hs | 2 -- src/Vervis/Federation/Ticket.hs | 3 --- src/Vervis/Handler/Cloth.hs | 3 +++ src/Vervis/Handler/Ticket.hs | 3 +++ src/Vervis/Migration.hs | 2 ++ th/models | 1 - 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index 15ad4f2..9797f9a 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -708,7 +708,6 @@ applyC (Entity senderPersonID senderPerson) senderActor maybeCap localRecips rem { ticketResolveLocalTicket = trid , ticketResolveLocalActivity = applyID } - update ticketID [TicketStatus =. TSClosed] prepareAccept luApply actors stages = do encodeRouteHome <- getEncodeRouteHome @@ -2354,7 +2353,6 @@ offerTicketC (Entity senderPersonID senderPerson) senderActor maybeCap localReci , ticketTitle = title , ticketSource = source , ticketDescription = desc - , ticketStatus = TSNew , ticketDiscuss = did , ticketFollowers = fsid , ticketAccept = acceptID diff --git a/src/Vervis/Federation/Ticket.hs b/src/Vervis/Federation/Ticket.hs index 26c4120..23f1c05 100644 --- a/src/Vervis/Federation/Ticket.hs +++ b/src/Vervis/Federation/Ticket.hs @@ -425,7 +425,6 @@ deckOfferTicketF now recipDeckHash author body mfwd luOffer ticket uTarget = do , ticketTitle = title , ticketSource = source , ticketDescription = desc - , ticketStatus = TSNew , ticketDiscuss = did , ticketFollowers = fsid , ticketAccept = acceptID @@ -734,7 +733,6 @@ loomOfferTicketF now recipLoomHash author body mfwd luOffer ticket uTarget = do , ticketTitle = title , ticketSource = source , ticketDescription = desc - , ticketStatus = TSNew , ticketDiscuss = did , ticketFollowers = fsid , ticketAccept = acceptID @@ -1256,7 +1254,6 @@ loomApplyF now recipLoomHash author body mfwd luApply apply = (,Nothing) <$> do , ticketResolveRemoteActivity = applyID , ticketResolveRemoteActor = remoteAuthorId author } - update ticketID [TicketStatus =. TSClosed] prepareAccept clothID = do encodeRouteHome <- getEncodeRouteHome diff --git a/src/Vervis/Handler/Cloth.hs b/src/Vervis/Handler/Cloth.hs index 0e64c89..eb0e4dc 100644 --- a/src/Vervis/Handler/Cloth.hs +++ b/src/Vervis/Handler/Cloth.hs @@ -356,10 +356,13 @@ getClothR loomHash clothHash = do cIrrelevant <- newIdent let relevant filt = bool cIrrelevant cRelevant $ + {- case ticketStatus ticket of TSNew -> wffNew filt TSTodo -> wffTodo filt TSClosed -> wffClosed filt + -} + True let followButton = followW (ClothFollowR loomHash clothHash) diff --git a/src/Vervis/Handler/Ticket.hs b/src/Vervis/Handler/Ticket.hs index c8d988b..52882d1 100644 --- a/src/Vervis/Handler/Ticket.hs +++ b/src/Vervis/Handler/Ticket.hs @@ -291,10 +291,13 @@ getTicketR deckHash ticketHash = do cIrrelevant <- newIdent let relevant filt = bool cIrrelevant cRelevant $ + {- case ticketStatus ticket of TSNew -> wffNew filt TSTodo -> wffTodo filt TSClosed -> wffClosed filt + -} + True let followButton = followW (TicketFollowR deckHash ticketHash) diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index b21a34f..43689c7 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -2931,6 +2931,8 @@ changes hLocal ctx = "CollabFulfillsInvite" -- 528 , addUnique' "CollabRecipRemoteAccept" "Invite" ["invite"] + -- 529 + , removeField "Ticket" "status" ] migrateDB diff --git a/th/models b/th/models index bab60bf..47f0910 100644 --- a/th/models +++ b/th/models @@ -395,7 +395,6 @@ Ticket title Text source PandocMarkdown description HTML - status TicketStatus discuss DiscussionId followers FollowerSetId accept OutboxItemId