# HG changeset patch # User Chris Cannam # Date 1352469473 0 # Node ID c43450d547874fee7e6ab82a8f9c7c7a514d08fb # Parent f9a882232e2d6c1da16eb4579c215b47f4534f9d Fix bug 494, Tag search doesn't work for tagged subprojects whose parents lack the tag diff -r f9a882232e2d -r c43450d54787 vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb --- a/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Fri Nov 09 13:57:39 2012 +0000 +++ b/vendor/plugins/redmine_tags/lib/redmine_tags/patches/projects_controller_patch.rb Fri Nov 09 13:57:53 2012 +0000 @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- require_dependency 'projects_controller' module RedmineTags @@ -127,13 +128,10 @@ end unless @tag_list.empty? - @tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id) } + @tagged_projects_ids = Project.visible.tagged_with(@tag_list).collect{ |project| Project.find(project.id).root } @projects = @projects & @tagged_projects_ids + @projects = @projects.uniq end - - @projects = @projects.collect{ |project| project.root } - @projects = @projects.uniq - end end end