gitlab-org--gitlab-foss/app
Douwe Maan c003fc5091 Merge branch '23662-issue-move-user-reference-exception' into 'master'
Fix `User#to_reference`

## 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 `Referable`s 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](c8b2b3f7c3 (91fabb7ad88bd2fde6fef1c100a719c00e503047_75_79)), which expects
   all `Referable`s that don't respond to `:project` to have a `to_reference`
   method that takes two arguments.   

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

- Closes #23662

See merge request !7088
2016-10-25 10:54:48 +00:00
..
assets Merge branch 'scope-input-errors' into 'master' 2016-10-25 08:42:10 +00:00
controllers Merge branch 'security-fix-leaking-namespace-name' into 'security' 2016-10-24 15:49:05 +02:00
finders Improve readability and add specs for label filtering 2016-10-24 23:06:14 -07:00
helpers Merge branch '23341-fix-viewing-mr-from-deleted-project' into 'master' 2016-10-20 14:03:10 +00:00
mailers Just show the first merge request we found, feedback: 2016-10-14 19:54:51 +08:00
models Merge branch '23662-issue-move-user-reference-exception' into 'master' 2016-10-25 10:54:48 +00:00
policies Use delegate! on group and project labels policies 2016-10-19 14:58:26 -02:00
services Merge branch 'barthc/gitlab-ce-prevent_authored_vote_from_notes' 2016-10-24 15:25:37 +02:00
uploaders
validators Add robots.txt to the list of reserved namespaces 2016-10-11 02:58:26 +01:00
views Merge branch 'register-tab' into 'master' 2016-10-25 02:47:27 +00:00
workers Re-organize queues to use for Sidekiq 2016-10-21 18:17:07 +02:00