Defect #17486

Error when removing user from group

Added by Roland Lezuo about 8 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:


Target version:2.5.3
Resolution:Fixed Affected version:2.5.1


Trying to remove certain users from certain groups raises and redmine error.

i.e.: deleting "foo" from group "bar" (using Administration->Groups)
leads to the following trace in production.log:

Started DELETE "/redmine/groups/207/users/211" for at 2014-07-16 18:36:28 +0200
Processing by GroupsController#remove_user as JS
Parameters: {"id"=>"207", "user_id"=>"211"}
Current user: xxx (id=608)
Completed 500 Internal Server Error in 21.8ms

NoMethodError (undefined method `id' for nil:NilClass):
app/models/member.rb:87:in `set_issue_category_nil'
app/models/member_role.rb:42:in `remove_member_if_empty'
app/models/group.rb:68:in `block in user_removed'
app/models/group.rb:67:in `user_removed'
app/controllers/groups_controller.rb:103:in `remove_user'

Some users were successfully deleted, but some others consistently raise this error.

Associated revisions

Revision 13334
Added by Jean-Philippe Lang about 8 years ago

Fixed an error when member's project is nil (#17486).


#1 Updated by Toshi MARUYAMA about 8 years ago

  • Category set to Groups

#2 Updated by Jean-Philippe Lang about 8 years ago

  • Subject changed from internal server error 500 when removing user from group to Error when removing user from group
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.3
  • Resolution set to Fixed

This should be fixed by r13334.

#3 Updated by Jean-Philippe Lang almost 8 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF