Commit 5c23bb11 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'bugfix/303/dashboard_feed_ids' into 'master'

Move Event Helper To Use Project-level IDs Instead of Global IDs

This MR fixes issue #303 by updating app/helpers/event_helper.rb to use project-level IDs within the event title as opposed to global IDs (i.e. use target_iid instead of target_id).

This ties the issue and merge request numbers on the feed together with the numbers used throughout the rest of the site.
parents 3d98c1ea 2e03ccff
......@@ -45,15 +45,15 @@ module EventsHelper
def event_feed_title(event)
if event.issue?
"#{event.author_name} #{event.action_name} issue ##{event.target_id}: #{event.issue_title} at #{event.project_name}"
"#{event.author_name} #{event.action_name} issue ##{event.target_iid}: #{event.issue_title} at #{event.project_name}"
elsif event.merge_request?
"#{event.author_name} #{event.action_name} MR ##{event.target_id}: #{event.merge_request_title} at #{event.project_name}"
"#{event.author_name} #{event.action_name} MR ##{event.target_iid}: #{event.merge_request_title} at #{event.project_name}"
elsif event.push?
"#{event.author_name} #{event.push_action_name} #{event.ref_type} #{event.ref_name} at #{event.project_name}"
elsif event.membership_changed?
"#{event.author_name} #{event.action_name} #{event.project_name}"
elsif event.note?
"#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_id} at #{event.project_name}"
"#{event.author_name} commented on #{event.note_target_type} ##{truncate event.note_target_iid} at #{event.project_name}"
else
""
end
......
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