diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-07-26 20:28:21 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-07-26 20:28:21 +0000 |
commit | 158d21b75c2f63582969afac147a7d51d3e7de28 (patch) | |
tree | ffce38f1ff7ec4d0b16e22fdb57bd3e251cd1c6a /app/helpers | |
parent | 3ebe6a8b0a1cd1ba32b7ffa934d20c9d24fdd9c3 (diff) | |
download | redmine-158d21b75c2f63582969afac147a7d51d3e7de28.tar.gz redmine-158d21b75c2f63582969afac147a7d51d3e7de28.zip |
Link total spent time to global time entries page when cross_project_issue_relations are allowed in order to include time entries from other projects (#35134).
git-svn-id: http://svn.redmine.org/redmine/trunk@21082 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issues_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 756d7ed4c..b8e1dd414 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -264,6 +264,11 @@ module IssuesHelper if issue.total_spent_hours == issue.spent_hours link_to(l_hours_short(issue.spent_hours), path) else + # link to global time entries if cross-project subtasks are allowed + # in order to show time entries from not descendents projects + if %w(system tree hierarchy).include?(Setting.cross_project_subtasks) + path = time_entries_path(:issue_id => "~#{issue.id}") + end s = issue.spent_hours > 0 ? l_hours_short(issue.spent_hours) : "" s += " (#{l(:label_total)}: #{link_to l_hours_short(issue.total_spent_hours), path})" s.html_safe |