We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 321c4a8d authored by David L. L. Thomas's avatar David L. L. Thomas

Bugfix - reporting correct claiming user

parent 467a9337
......@@ -124,11 +124,15 @@ makeCommentForestWidget
earlier_closures_map <- fetchCommentsAncestorClosuresDB root_ids
earlier_retracts_map <- fetchCommentsAncestorRetractsDB root_ids
user_map <- entitiesMap <$> fetchUsersInDB (S.toList $ makeCommentUsersSet all_comments)
claim_map <- makeClaimedTicketMapDB all_comment_ids
let claiming_users_set = S.fromList $ map ticketClaimingUser $ M.elems claim_map
user_map <- entitiesMap <$> fetchUsersInDB (S.toList $ makeCommentUsersSet all_comments <> claiming_users_set)
closure_map <- makeCommentClosingMapDB all_comment_ids
retract_map <- makeCommentRetractingMapDB all_comment_ids
ticket_map <- makeTicketMapDB all_comment_ids
claim_map <- makeClaimedTicketMapDB all_comment_ids
flag_map <- makeFlagMapDB all_comment_ids
return (children, user_map, earlier_closures_map, earlier_retracts_map,
......
......@@ -438,6 +438,13 @@ commentWidget (Entity comment_id comment)
M.lookup comment_id <$>
(fetchCommentCommentTagsDB comment_id >>= buildAnnotatedCommentTagsDB mviewer_id)
user_map <- case mclaim of
Nothing -> return M.empty
Just claim -> do
let claiming_user_id = ticketClaimingUser claim
Just claiming_user <- runDB $ get claiming_user_id
return $ M.singleton claiming_user_id claiming_user
let ticket_str = case mticket of
Just (Entity (Key (PersistInt64 tid)) _) -> T.pack $ show tid
_ -> "???"
......
......@@ -39,18 +39,20 @@
$else
$maybe claim <- mclaim
<span .claimed-by>
claimed
^{renderTime (ticketClaimingTs claim)}
by
<a href="@{UserR user_id}">#{userDisplayName (Entity user_id user)}#
$maybe note <- ticketClaimingNote claim
: #{note}
$if can_unclaim
<div :is_preview:.preview .comment-action>
<a href="@{comment_route_unclaim comment_id}">
(unclaim)
$with claiming_user_id <- ticketClaimingUser claim
$maybe claiming_user <- M.lookup claiming_user_id user_map
<span .claimed-by>
claimed
^{renderTime (ticketClaimingTs claim)}
by
<a href="@{UserR claiming_user_id}">#{userDisplayName $ Entity claiming_user_id claiming_user}#
$maybe note <- ticketClaimingNote claim
: #{note}
$if can_unclaim
<div :is_preview:.preview .comment-action>
<a href="@{comment_route_unclaim comment_id}">
(unclaim)
$if is_unapproved
<div .awaiting-approval>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment