Skip to content

Fix `User#to_reference`

Timothy Andrew requested to merge 23662-issue-move-user-reference-exception into master

What does this MR do?

Fix the method signature of User#to_reference so that moving an issue with a user reference does not throw a "invalid number of arguments" exception.

Why was this MR needed?

  1. Changes in 8.13 require Referables that don't have a project reference to accept two arguments - from_project and target_project.

  2. User#to_reference was not changed to accept the target_project (even though it is not used). Moving an issue containing a user reference would throw a "invalid number of arguments" exception.

  3. The regression was introduced in c8b2b3f7, which expects all Referables that don't respond to :project to have a to_reference method that takes two arguments.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Merge request reports