How to remove group from project?

Added by Frank Schimmelpfennig over 5 years ago

Hi all,
I have a problem to remove group-project relations. If I jump to <project-to-remove-from> > settings > members > <group-to-remove>, and click the delete button of the group to remove nothing happens. Same if I try it by administration > groups > <group-to-remove> tab: projects > <project-to-remove-from> > button: delete.

Is there any idea?

My environment is:
Redmine version 3.3.0.stable
Ruby version 2.2.1-p85 (2015-02-26) [x86_64-linux]
Rails version 4.2.6
Environment production
Database adapter Mysql2

-Thanks in advance for any help!

Frank

Replies (3)

RE: How to remove group from project? - Added by Frank Schimmelpfennig over 5 years ago

Hi all,
if I klick the delete button on <project-to-remove-from> > settings > members > <group-to-remove> I get following log entry:

...
Started DELETE "/memberships/2" for <client_node> at 2016-08-03 11:36:03 +0200
Processing by MembersController#destroy as JS
Parameters: {"id"=>"2"}
Current user: admin (id=1)
Completed 500 Internal Server Error in 38ms (ActiveRecord: 14.4ms)

NoMethodError (undefined method `roles' for nil:NilClass):
app/models/member_role.rb:49:in `remove_member_if_empty'
app/models/member_role.rb:77:in `each'
app/models/member_role.rb:77:in `block in remove_inherited_roles'
app/models/member_role.rb:76:in `each'
app/models/member_role.rb:76:in `remove_inherited_roles'
app/models/member_role.rb:43:in `destroy_without_member_removal'
app/models/member.rb:121:in `destroy'
app/controllers/members_controller.rb:103:in `destroy'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

RE: How to remove group from project? - Added by Frank Schimmelpfennig over 5 years ago

Hi all,
I fixed this problem by deleting the relevant rows from the members and member_roles tables.

RE: How to remove group from project? - Added by Joaquim Homrighausen over 5 years ago

Could this be related to this other post:
http://www.redmine.org/boards/1/topics/39441?r=39448

I have run into this as well (unable to remove a group from project) with 3.3.0.

(1-3/3)