Use the destination project when serializing moved issues

What does this MR do and why?

Uses the destination project when serializing an issue moved through the REST API.

The move response returns the destination issue, but previously evaluated its subscribed state with source-project context. This could report subscribed: true despite a target-scoped explicit subscription of false.

Closes #628655

Implementation

Pass new_project rather than user_project to the move response serializer. This consistently serializes the destination issue with destination-project context.

Tests

bundle exec rspec spec/requests/api/issues/post_projects_issues_spec.rb:612

1 example, 0 failures.

bundle exec rspec spec/requests/api/issues/post_projects_issues_spec.rb:584

21 examples, 0 failures, 1 pending.

bundle exec rubocop lib/api/issues.rb spec/requests/api/issues/post_projects_issues_spec.rb

2 files inspected, no offenses.

git diff --check

Passed.

Documentation

No documentation update is needed; the response schema is unchanged.

Risk

Low risk: this changes only the project context used to serialize an already-created destination issue. The adjacent clone path already uses destination-project context.

AI assistance

AI tooling was used to assist with investigation and drafting. The contributor independently reviewed the implementation, reproduced the bug locally, verified the regression test and fix, and takes responsibility for the submitted changes.

Merge request reports

Loading
Loading