Clone individual work items with Jira Automation Rules.
Deep Clone provides the Jira Automation Rule action “Deep Clone - Single Clone” for cloning a single work item.
Clone A Single Work Item With A Jira Automation Rule
Prerequisites
-
Create a Jira Automation Rule with a trigger and any steps that you want to execute before the work item clone, following Atlassian's Jira Automation Documentation.
Adding A Single Work Item Clone Action
-
Open the configuration of your Jira Automation Rule
-
Click on + Add Component
-
Choose THEN: Add an action
-
In the Search actions box, search for “Deep Clone”
-
In the result list, select “Deep Clone - Single Clone”
-
Confirm the message “Before you can use this component, you'll need to connect Atlassian Automation” by clicking Connect. Deep Clone executes the clone as if the connected user had triggered the clone. Make sure that the connected user has all necessary permissions.
-
Fill in the action’s configuration:
-
Source Work Item Key: The key of the work item to clone. Enter either a fixed work item key or a smart value expression that resolves to different values depending on the execution context of your automation rule. Browse the available smart values by clicking the {} button to the right of the input field.
-
Preset: The preset for the clone configuration. This preset determines the settings that will be used for the clone. Choose a preset from the dropdown or click the {} button to switch to the smart value input mode which allows you to enter a smart value expression that resolves to different values depending on the execution context of your automation rule.
-
Target Space: The target space for the clone. Choose a target space from the dropdown or click the {} button to switch to the smart value input mode which allows you to enter a smart value expression that resolves to different values depending on the execution context of your automation rule. This configuration is optional. If you don’t set a target space here, Deep Clone clones to the target space configured in the preset.
-
Target Work Type: The target work type for the clone. Choose a target work type from the dropdown or click the {} button to switch to the smart value input mode which allows you to enter a smart value expression that resolves to different values depending on the execution context of your automation rule. This configuration is optional. If you don’t set a target work type here, Deep Clone clones to the target work type configured in the preset.
-
-
Click on Next to finish the configuration.
Using the Single Work Item Clone Action Output
The action outputs information about its results as smart values that can be used in subsequent automation actions. The following outputs are available:
-
{{triggeredDeepCloneWorkItem.status}}: The status of the clone action at the time that the action returned control to the automation. As automations action have a maximum runtime of 25 seconds, the action might return before the clone is finished, which will be indicated in this output field. The possible statuses are:
-
INITIALIZED: The job is not finished yet. So far, no work items clones have been created.
-
CREATED: The job is not finished yet. At least one work item clone has already been created.
-
SUCCESS: The job is finished. All work item clones have been created.
-
PARTIAL_SUCCESS: The job is finished. Some work item clones were created successfully, some work item clones could not be created due to errors.
-
ERROR: The job is finished. No work item clones could be created due to errors.
-
-
{{triggeredDeepCloneWorkItem.workItemId}}: The id of the first work item clone that the action created.
-
{{triggeredDeepCloneWorkItem.workItemKey}}: The key of the first work item clone that the action created.
-
{{triggeredDeepCloneWorkItem.spaceId}}: The id of the space in which the action created the first work item clone.
-
{{triggeredDeepCloneWorkItem.spaceKey}}: The key of the space in which the action created the first work item clone.
-
{{triggeredDeepCloneWorkItem.workTypeId}}: The id of the work type with which the action created the first work item clone.
-
{{triggeredDeepCloneWorkItem.workTypeName}}: The name of the work type with which the action created the first work item clone.
-
{{triggeredDeepCloneWorkItem.allWorkItemIds}}: A comma-separated list of the ids of all work item clones that the action created. If the action has status SUCCESS, PARTIAL_SUCESS or ERROR, this list contains all created work items. For other statuses, the list only includes the work items that have been created so far and further work items might be created as the clone continues to run in the backend.
-
{{triggeredDeepCloneWorkItem.allWorkItemKeys}}: A comma-separated list of the keys of all work item clones that the action created. If the action has status SUCCESS, PARTIAL_SUCESS or ERROR, this list contains all created work items. For other statuses, the list only includes the work items that have been created so far and further work items might be created as the clone continues to run in the backend.
-
{{triggeredDeepCloneWorkItem.messageJson}}: This field contains warning and error messages generated during the clone process. The JSON object has the following structure:
{ "<SourceWorkItemKey>: { <CloneActionKey>: <Messages (comma-separated)> ... } }For example:
{ "TEST-1": { "reporter": "Reporter was not among editable fields.", "assignee": "You do not have permission to edit issues in this project." } }
Managing Permissions for Jira Automation Clones
Deep Clone executes the clone as if the connected user had triggered the clone. Make sure that the connected user has all necessary permissions.
Tracking Jira Automation Clones
Check the Jira Automation Clone tab in the Clone History to see all clones that were executed by the Deep Clone Jira Automation Action.
Only Administrators and the user to which you connected the Deep Clone Jira Automation Action can see the clones in the Clone History.