Fixes preserving external author on work item move and clone
What does this MR do and why?
Fixes preserving external author on work item move and clone
This fix corrects a bug where we would add the Service Desk email address as external author when moving or cloning a work item.
Now we copy the external author from the original work item if present.
Changelog: fixed
Why do we see it now?
This implementation was introduced several milestones ago but only really visible today because we added the external author to the work item detail view last week or so.
Root Cause Analysis
The service_desk_reply_to method in CopyDataHandler assumes that if the target project has service desk enabled, the moved work item should have the service desk address set. This is incorrect because:
-
Non-service-desk issues shouldn't get a service desk address - Only issues created via service desk (with
support_botas author) should have this field set -
The original value should be preserved or cleared - If the original work item had an external author, it should be preserved; otherwise, it should be
nil - Service desk address is project-specific - The service desk address is tied to the project's service desk configuration, not to whether an issue is being moved there
References
Screenshots or screen recordings
Issue (or any other WIT)
| Before | After |
|---|---|
|
|
Ticket
| Before | After |
|---|---|
|
|
How to set up and validate locally
- Set up Service Desk and create a new ticket using this snippet
- Move the ticket to another project
- See that the external author is not overwritten
- Create an issue and move it to another project.
- See that it doesn't have an external author.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.



