プロジェクト

全般

プロフィール

Vote #73862

完了

Add tracker name to Redmine issue link titles

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
102
issue_org_id:
13946
author_id:
1565
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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 roughly[1] 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)

fn1. the subject is actually truncated at first


journals

+1
This is an updated patch against latest trunk (r14468).
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Thanks for the patch, committed in r14620.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン3.2.0_102 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0