Clone issue with quick action
Problem To Solve
When I'm creating a lot of issues, I want to quickly clone the meta data of one issue into the new issue i'm making, so that I don't have to manually add all the same meta data.
Additional context:
We currently have a copy_meta
data quick action, but it is clunky because it requires you to first create the new issue, copy the ID or path of the issue you want to copy meta data from, then use the quick action. Cloning would remove that clunky workflow.
Proposal
- A new quick action called
/clone
and companion UI element, that you can use in an issue, if you have permissions to do so. - When you initiate a clone, you first select which project you want to clone into, with the current project being the default.
- Once you confirm the target project and clone the issue, a link to the cloned issue via a system note / contained within a success message on the current issue. A separate link is also visible to go directly to edit the issue. If the edit issue link is clicked, initialize the edit form with:
- Title
- Description
- Confidentiality
- Author
- Milestone
- Due Date
- Labels
- Iteration (needs to be added to the New Issue form)
- Assignees
- Weight
- Health Status
- The
/clone
quick action supports an additional param/clone [path]
. If it is not present, the current project is used for the target. If it is set, the path is used for the target.
Possible MVC breakdown
- Clone w/ quick action. Show success message with link to cloned issue.
- Clone w/ quick action and optionally include notes.
- Clone w/ quick action and specify target path.
- Clone w/ quick action and provide links to both the issue and the direct link to the edit issue view.
- Clone via UI button and optionally select target project and include checkbox for including system notes.
UX
@hollyreynolds to add final UX
UX Considerations
- We are proposing consolidating certain global issue actions into a combined drop down menu in the Issue header / sticky title (#233974 (closed)). This would be a logical place for the "Clone" UI action to live.
Quick Action edge cases
- What happens if an issue is created programmatically with the
/clone
quick action present? Given the/clone
just initiates the workflow for cloning the issue, would we go ahead and create the issue in this instance since we can't redirect to a "New Issue" form?
Alternative considerations
Given the proposal, you would need to select a target project before going to the new issue form. Why don't we just put the target project field on the new issue form to begin with? Our current UX approach that requires users to navigate to a project before creating an issue is clunky and doesn't feel ideal. Given:
I should be able to select "New Issue" and select which project I want to create the issue within. This may be a separate issue, but if we did that first, it would make initiating a clone a bit more intuitive.
Permissions
- Follow the same permissions model for roles that are able to create issues
Tier
- GitLab Core because being able to clone an Issue would not impact a purchasing decision by a buyer in one of our paid tiers.
Acceptance Criteria
-
/clone
quick action. -
UI element to Clone an issue. -
Cloning is tied to the Issuable model so we can easily Clone Epics (#9398) and other objects that use the Issuable model. -
A bit of future proofing so when new attributes are added to Issuables, they are required to define whether or not they are clonable. If we make this an optional question to answer, it will most likely get overlooked during the initial implementation of the new attribute. -
Pajamas First. -
GraphQL First. -
Tests.
Not a hard acceptance criteria, but this does relate to #9421 (closed) in that we are refactoring the "New Issue" view to use Vue/Pajamas (and ideally GraphQL once #229838 (closed) is done)
Release Notes
Issues have a copy_meta
data quick action, but it's a bit clunky because it requires you to first create the new issue, copy the ID or path of the issue you want to copy meta data from, then use the quick action. To make generating similar issues more efficient, issues now support a /clone
quick action to create a new issue in the same project with identical title, description, and meta-data.
By default, issues are cloned into the same project and do not include system notes and comments. To change the default behavior when cloning:
- Specify a project path --
/clone gitlab-org/gitlab
-- to clone the issue to a different project. - Use the
--with_notes
parameter to copy system notes and comments during the clone.
https://docs.gitlab.com/ee/user/project/quick_actions.html
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.