mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
8dd148e640
https://community.openproject.org/wp/70290
This fixes the regression introduced in 5ea185ef66: the
`possible_principal_id` was run against the source project instead of
the target project, leading to always return something.
Fix is to always run `possible_principal_id` against the target project.
This was not detected by the unit tests: original tests were taking the
first work package of the copied project to check that the user field
was nil, assuming the first work package would be the copy of the one
having the user field set, but actually the work package was not copied,
so another work package is picked and this one has all user fields nil
because the original work package has all user fields nil.
The test was fixed by explicitly getting the copied work package using
the subject of the original work package, and failing if the copied work
package is not found.