summaryrefslogtreecommitdiffstats
path: root/app/helpers/versions_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-14 09:41:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-09-14 09:41:39 +0000
commit4fba4ca69177c308fa2c73365a31dd1fb1b74b8c (patch)
tree049e223199a7964548d46e48920c1a84aa21fced /app/helpers/versions_helper.rb
parent2eb95f41b41d4cf7fef6773f98100e6a449f9192 (diff)
downloadredmine-4fba4ca69177c308fa2c73365a31dd1fb1b74b8c.tar.gz
redmine-4fba4ca69177c308fa2c73365a31dd1fb1b74b8c.zip
Fixed: Issues counters in roadmap only link to issues in the same project (#9660).
Contributed by Sridhar Dhanapalan. git-svn-id: http://svn.redmine.org/redmine/trunk@13398 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/versions_helper.rb')
-rw-r--r--app/helpers/versions_helper.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/helpers/versions_helper.rb b/app/helpers/versions_helper.rb
index 6a3aeb5aa..f54deef0d 100644
--- a/app/helpers/versions_helper.rb
+++ b/app/helpers/versions_helper.rb
@@ -27,6 +27,28 @@ module VersionsHelper
end
end
+ def version_filtered_issues_path(version, options = {})
+ options = {:fixed_version_id => version, :set_filter => 1}.merge(options)
+ project = case version.sharing
+ when 'hierarchy', 'tree'
+ if version.project && version.project.root.visible?
+ version.project.root
+ else
+ version.project
+ end
+ when 'system'
+ nil
+ else
+ version.project
+ end
+
+ if project
+ project_issues_path(project, options)
+ else
+ issues_path(options)
+ end
+ end
+
STATUS_BY_CRITERIAS = %w(tracker status priority author assigned_to category)
def render_issue_status_by(version, criteria)