summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 10:51:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 10:51:46 +0000
commit9b5cccff390475899b8a7190938d834f1e64dbc4 (patch)
treeebc648c90116ea0f3825c20e31e520ab41e466d1
parentace151c14cb3d043e107920297ec2875f891b22f (diff)
downloadredmine-9b5cccff390475899b8a7190938d834f1e64dbc4.tar.gz
redmine-9b5cccff390475899b8a7190938d834f1e64dbc4.zip
##123 syntax for linking to issues: Title cannot be distinguished from following text (#32765).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@19663 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--test/helpers/application_helper_test.rb23
2 files changed, 12 insertions, 15 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index f94732fc6..a3e838b61 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1059,10 +1059,10 @@ module ApplicationHelper
url = issue_url(issue, :only_path => only_path, :anchor => anchor)
link =
if sep == '##'
- link_to("#{issue.tracker.name} ##{oid}#{comment_suffix}",
+ link_to("#{issue.tracker.name} ##{oid}#{comment_suffix}: #{issue.subject}",
url,
:class => issue.css_classes,
- :title => "#{issue.tracker.name}: #{issue.subject.truncate(100)} (#{issue.status.name})") + ": #{issue.subject}"
+ :title => "#{l(:field_status)}: #{issue.status.name}")
else
link_to("##{oid}#{comment_suffix}",
url,
diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb
index d076aba86..344f72823 100644
--- a/test/helpers/application_helper_test.rb
+++ b/test/helpers/application_helper_test.rb
@@ -310,11 +310,10 @@ class ApplicationHelperTest < Redmine::HelperTest
:class => Issue.find(3).css_classes,
:title => 'Bug: Error 281 when updating a recipe (New)')
ext_issue_link = link_to(
- 'Bug #3',
+ 'Bug #3: Error 281 when updating a recipe',
{:controller => 'issues', :action => 'show', :id => 3},
:class => Issue.find(3).css_classes,
- :title => 'Bug: Error 281 when updating a recipe (New)') +
- ": Error 281 when updating a recipe"
+ :title => 'Status: New')
note_link = link_to(
'#3-14',
{:controller => 'issues', :action => 'show',
@@ -322,12 +321,11 @@ class ApplicationHelperTest < Redmine::HelperTest
:class => Issue.find(3).css_classes,
:title => 'Bug: Error 281 when updating a recipe (New)')
ext_note_link = link_to(
- 'Bug #3-14',
+ 'Bug #3-14: Error 281 when updating a recipe',
{:controller => 'issues', :action => 'show',
:id => 3, :anchor => 'note-14'},
:class => Issue.find(3).css_classes,
- :title => 'Bug: Error 281 when updating a recipe (New)') +
- ": Error 281 when updating a recipe"
+ :title => 'Status: New')
note_link2 = link_to(
'#3#note-14',
{:controller => 'issues', :action => 'show',
@@ -335,12 +333,11 @@ class ApplicationHelperTest < Redmine::HelperTest
:class => Issue.find(3).css_classes,
:title => 'Bug: Error 281 when updating a recipe (New)')
ext_note_link2 = link_to(
- 'Bug #3#note-14',
+ 'Bug #3#note-14: Error 281 when updating a recipe',
{:controller => 'issues', :action => 'show',
:id => 3, :anchor => 'note-14'},
:class => Issue.find(3).css_classes,
- :title => 'Bug: Error 281 when updating a recipe (New)') +
- ": Error 281 when updating a recipe"
+ :title => 'Status: New')
revision_link = link_to(
'r1',
@@ -399,10 +396,10 @@ class ApplicationHelperTest < Redmine::HelperTest
# should not ignore leading zero
'#03' => '#03',
# tickets with more info
- '##3, [##3], (##3) and ##3.' => "#{ext_issue_link}, [#{ext_issue_link}], (#{ext_issue_link}) and #{ext_issue_link}.",
- '##3-14' => ext_note_link,
- '##3#note-14' => ext_note_link2,
- '##03' => '##03',
+ '##3, [##3], (##3) and ##3.' => "#{ext_issue_link}, [#{ext_issue_link}], (#{ext_issue_link}) and #{ext_issue_link}.",
+ '##3-14' => ext_note_link,
+ '##3#note-14' => ext_note_link2,
+ '##03' => '##03',
# changesets
'r1' => revision_link,
'r1.' => "#{revision_link}.",