Fix SQL query that selects ticket summary data, was making getTicketsR fail

This commit is contained in:
fr33domlover 2019-06-27 11:47:23 +00:00
parent 9f3e45c113
commit 63689aef1a

View file

@ -61,7 +61,10 @@ getTicketSummaries mfilt morder jid = fmap (map toSummary) $ select $ from $
on $ tal ?. TicketAuthorLocalAuthor ==. p ?. PersonId
on $ just (t ^. TicketId) ==. tal ?. TicketAuthorLocalTicket
where_ $ t ^. TicketProject ==. val jid
groupBy $ t ^. TicketId
groupBy
( t ^. TicketId, s ?. SharerId
, ra ?. RemoteActorId, i ?. InstanceId
)
for_ mfilt $ \ filt -> where_ $ filt t
for_ morder $ \ order -> orderBy $ order t
return