Update imported_from value when cloning and moving issues
What does this MR do and why?
This ensures all cloned or moved issues do not retain any imported_from
value, but sets imported_from
to :none
as cloned and moved issues should not appear to be imported.
This also updates the value for notes and designs , and removes reference to the import source from the .note_html
text
Removing the (imported from GitLab) text on Notes will be done in a follow up (see discussion).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before
After
Moved Issue
Cloned Issue
How to set up and validate locally
- Check out the branch and restart gdk.
- Import a group with a project with issues that have designs and comments using Direct Transfer: New Group > Import Group > Import Groups by Direct Transfer
(You will need a personal access token for the instance you want to import from that has
repo
scope. - Once the group and project has imported, open an issue and observe it has an "imported" badge next to the title, next to events, next to a comment, and next to a design title (on the design page)
- In the right column in the UI click the
Move issue
button - Select a project to move the issue to.
- Once it's moved, open the issue and observe it has no "imported" badges - note, when cloning comments and events aren't cloned.
- Return to a different issue in the imported project.
- In a comment box in the issue type
/clone
and select the Clone quick action. - Once created, visit the cloned issue and observe there is no "imported" badge.
Related to #461490 (closed)
Edited by Carla Drago