Project

General

Profile

Actions

Defect #25289

closed

Adding a principal to 2 projects with member inheritance leads to an error

Added by Felix Schäfer about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Administration
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When batch adding a user or a group to a project through the projects tab of the user/group page, adding the a user or group to 2 projects where one project inherits its members from the other might lead to an error (depending on the order of the projects, the parent project must come before the child project for this to happen, which it should as in the batch add view projects are arranged in trees). If more than those 2 projects are involved in the batch addition to a project, the user or group won't be added to all projects that come after the child project as the processing stops on the error.

This happens in source:/trunk/app/models/member.rb@16379#L175: First all Member s are created, then they are saved in the principal.members << members line. Saving the Member object for a parent project with a child project inheriting its members will create a Member object for the child project too, which then leads to an error when the Member error created for that child project is saved and recognised as a duplicate.


Files

25289.patch (692 Bytes) 25289.patch Felix Schäfer, 2017-03-08 20:56
Actions

Also available in: Atom PDF