piccio / redmine_watchers_groups

Allow groups to be added as watchers
2 stars 2 forks source link

Not working with redmine 3.4.6 stable #3

Closed mjoigny closed 5 years ago

mjoigny commented 6 years ago

Hi Roberto,

I've found your github to correct my issue since the upgrade to the 3.4.6 redmine version, but its not working when i want to add a watcher.

This is my log :

Started GET "/watchers/new?object_id=30474&object_type=issue" for x.x.x.x at 2018-08-01 18:02:22 +0200 Processing by WatchersController#new as JS Parameters: {"object_id"=>"30474", "object_type"=>"issue"} Current user: toto (id=46) Completed 500 Internal Server Error in 51ms (ActiveRecord: 12.5ms) ActiveRecord::StatementInvalid (PG::GroupingError: ERROR: column "users.id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: SELECT "users". FROM "users" INNER JOIN "groups_users" ON "... : SELECT "users". FROM "users" INNER JOIN "groups_users" ON "groups_users"."group_id" = "users"."id" WHERE "users"."type" IN ('Group', 'GroupBuiltin', 'GroupAnonymous', 'GroupNonMember') AND (groups_users.user_id IN (27)) GROUP BY "group_id" HAVING COUNT(group_id) = 1): plugins/redmine_watchers_groups/lib/redmine_watchers_groups/group_patch.rb:41:in block in watcher_groups' plugins/redmine_watchers_groups/lib/redmine_watchers_groups/group_patch.rb:27:ineach' plugins/redmine_watchers_groups/lib/redmine_watchers_groups/group_patch.rb:27:in watcher_groups' plugins/redmine_watchers_groups/lib/redmine_watchers_groups/watchers_controller_patch.rb:75:inusers_for_new_watcher' app/controllers/watchers_controller.rb:33:in new' lib/redmine/sudo_mode.rb:63:insudo_mode'

Do you have an idea ?

Regards.

mjoigny commented 6 years ago

UP

piccio commented 5 years ago

the 1.0.3 version changes the logic and that part of the code is no longer present