Clone Issue
This workflow contains two action rules that let users clone issues.
Name | @jetbrains/youtrack-workflow-clone-issue |
---|---|
Auto-attached | yes |
Modules | Clone issue (action rule) Clone issue as draft |
Use Case
This workflow is designed to help users make copies of existing issues so they can quickly track activities that are performed on a regular basis. These are written as action rules, so users can perform this operation on the fly, as required.
The rules that belong to this workflow serve different purposes:
The Clone issue rule creates issues in a reported state. This means that notification events are triggered as soon as the clone is created. If you need to make any changes to an issue that is created as a clone with this operation, users may receive a second round of notifications.
The Clone issue as draft rule creates issue drafts. Notification events are only triggered when you have finished editing the draft and report the issue.
To learn more about clone operations in YouTrack, see Clone Issues.
Rules
This workflow has two rules that let users clone issues in different ways.
Rule | Description |
---|---|
Clone issue | Creates a copy of an issue and reports it in the same project as the original. This workflow runs when you use the |
Clone issue as draft | Creates a copy of one or more selected issues as a new issue drafts instead of reporting them automatically in the original project. You can find the these copies in the list of Drafts when you create a new issue. This workflow runs when you use the |
Clone issue
First, the rule verifies that the issue has already been reported. If true, it creates a copy of the issue in context with the createCopy()
method. If successful, YouTrack displays a confirmation message.
Note that the createCopy()
method belongs to YouTrack's internal workflow API. When writing your own workflows, use Issue#copy()
instead.
Clone issue as draft
First, the rule verifies that the issue has already been reported. If true, it creates a copy of the issue in context with the createDraftCopy()
method and saves it as a draft. If successful, YouTrack displays a confirmation message.
Note that the createDraftCopy()
method belongs to YouTrack's internal workflow API. When writing your own workflows, use Issue#copy()
instead.