Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

500 when bulk-editing issues #200

Open
AThomsen opened this issue Apr 30, 2018 · 0 comments
Open

500 when bulk-editing issues #200

AThomsen opened this issue Apr 30, 2018 · 0 comments

Comments

@AThomsen
Copy link
Contributor

With MSSQL:

`TinyTds::Error: Column 'tags.name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.: EXEC sp_executesql N'SELECT tags.id, tags.name FROM [tags] INNER JOIN [taggings] ON [taggings].[tag_id] = [tags].[id] WHERE [taggings].[taggable_type] = @0 AND [taggings].[taggable_id] IN (23837, 23838, 23839) GROUP BY tags.id HAVING count(*) = 3', N'@0 nvarchar(4000)', @0 = N'Issue'

in file
plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb:81:in `get_common_tag_list_from_multiple_issues'

Patch

--- a/lib/redmine_tags/patches/issue_patch.rb
+++ b/lib/redmine_tags/patches/issue_patch.rb
@@ -77,7 +77,7 @@ module RedmineTags
           common_tags = ActsAsTaggableOn::Tag.joins(:taggings)
             .select('tags.id', 'tags.name')
             .where(:taggings => {:taggable_type => 'Issue', :taggable_id => ids})
-            .group('tags.id')
+            .group('tags.id', 'tags.name')
             .having("count(*) = #{ids.count}").to_a

           ActsAsTaggableOn::TagList.new(common_tags)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant