Skip to content

Update imported_from value when cloning and moving issues

Carla Drago requested to merge 461490-update-imported-when-moving into master

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

notes-events-before

design-before

After

Moved Issue

Issue-afterdesign-after

Cloned Issue

after-clone

How to set up and validate locally

  1. Check out the branch and restart gdk.
  2. 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.
  3. 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)
  4. In the right column in the UI click the Move issue button
  5. Select a project to move the issue to.
  6. Once it's moved, open the issue and observe it has no "imported" badges - note, when cloning comments and events aren't cloned.
  7. Return to a different issue in the imported project.
  8. In a comment box in the issue type /clone and select the Clone quick action.
  9. Once created, visit the cloned issue and observe there is no "imported" badge.

Related to #461490 (closed)

Edited by Carla Drago

Merge request reports