Feature #13946

Add tracker name to Redmine issue link titles

Added by Mischa The Evil about 5 years ago. Updated almost 3 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:UI
Target version:3.2.0
Resolution:Fixed

Description

This is a change I apply to most Redmine deployments but I never thought about posting it here before, until now.

Currently the issue link titles are roughly1 rendered as "issue.subject (issue.status.name)".
I propose to add the name of the tracker of the issue in front of the current text followed directly by a colon and a space.

Now Proposed
issue.subject (issue.status.name) issue.tracker.name: issue.subject (issue.status.name)

This can be done by changing source:/trunk/app/helpers/application_helper.rb@11784#L697 like:

Index: app/helpers/application_helper.rb
===================================================================
--- app/helpers/application_helper.rb   (revision 11784)
+++ app/helpers/application_helper.rb   (working copy)
@@ -694,7 +694,7 @@
               anchor = comment_id ? "note-#{comment_id}" : nil
               link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor},
                                         :class => issue.css_classes,
-                                        :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
+                                        :title => "#{issue.tracker.name}: #{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
             end
           when 'document'
             if document = Document.visible.find_by_id(oid)

1 the subject is actually truncated at first

feature-13946-against-r14468.diff Magnifier - patch against r14468 (783 Bytes) Go MAEDA, 2015-07-26 17:54

rm13946-add-tracker-name-to-issue-link-titles-tests-fixed-trunk@r14471.diff Magnifier (3.92 KB) Mischa The Evil, 2015-07-29 07:03

Associated revisions

Revision 14620
Added by Jean-Philippe Lang almost 3 years ago

Adds tracker name to Redmine issue link titles (#13946).

History

#1 Updated by Go MAEDA almost 3 years ago

+1
This is an updated patch against latest trunk (r14468).

#2 Updated by Mischa The Evil almost 3 years ago

Actually, this change breaks some tests. The assertions don't expect the tracker name. I've modified them to reflect the new issue link title with tracker name and extracted an updated (svn) diff against source:/trunk@14471 which I'll attach here.

Thanks for updating this issue. Mischa.

#3 Updated by Toshi MARUYAMA almost 3 years ago

  • Target version changed from Candidate for next major release to 3.2.0

#4 Updated by Jean-Philippe Lang almost 3 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Thanks for the patch, committed in r14620.

Also available in: Atom PDF