Mention column name and creator in push event body when card is moved between columns
This commit is contained in:
@@ -22,6 +22,8 @@ class Notification::EventPayload < Notification::DefaultPayload
|
||||
card.closure ? "Moved to Done by #{event.creator.name}" : "Closed by #{event.creator.name}"
|
||||
when "card_reopened"
|
||||
"Reopened by #{event.creator.name}"
|
||||
when "card_triaged"
|
||||
"Moved to #{column_name} by #{event.creator.name}"
|
||||
else
|
||||
event.creator.name
|
||||
end
|
||||
@@ -57,6 +59,10 @@ class Notification::EventPayload < Notification::DefaultPayload
|
||||
card.title.presence || "Card #{card.number}"
|
||||
end
|
||||
|
||||
def column_name
|
||||
event.particulars.dig("particulars", "column")
|
||||
end
|
||||
|
||||
def card_url_with_comment_anchor(comment)
|
||||
Rails.application.routes.url_helpers.card_url(
|
||||
comment.card,
|
||||
|
||||
Reference in New Issue
Block a user