Skip to main content
Skip table of contents

Automatically copy an issue during a workflow status transition

The need: create an issue on transition

Jira admins thrive to make the life of their users easier. What's easier that being able to copy an issue automatically without any additional action on the user's part?

The solution: add a recipe as a post-function to a workflow transition

With Elements Copy & Sync, custom copies of issues can be created when the status of an issue is updated during a given transition.

Tutorial 

In this example, we will copy an issue with the key SUP-1 when its status is transitioned to "In Progress".

This guide explains how to configure a Copy & Sync post-function during a Jira workflow transition so that a copy recipe is automatically triggered when the status is updated.

Prerequisites

A recipe called "Escalate ticket" has been created, activated, and is available on issue SUP-1.
This recipe must target only one project and one issue type.

When a recipe is triggered during workflow transition, the copy is performed without any input from the user. This means no issue creation screen is displayed during the transition.

For this reason, recipes that are meant to be triggered during transition must only target one project and one issue type, because the user is not able to select these options during the transition (except if they use the value from a custom field).

Configuration steps

1 - As a Jira administrator, go to Jira workflows administration page : Settings > Issues > Workflows.

2 - Click on the Edit button related to the workflow you want to update (in our case, the one used by issue SUP-1).

3 - In the diagram view, click on the "In Progress" transition. Then, click on Post-functions.

4 - Click on Add a post-function.

5 - Select the Elements Copy & Sync option, then click on the Add button.

6 - Select the recipe "Escalate ticket" and add it to the post-function.

There are three additional options available on this screen: Delay, Prevent post-function from running twice and Copy comment on transition.

Delay
By default, the delay is set to "0", which means that the recipe is triggered as soon as the post-function is run. 
However, it is possible to set a delay up to 30 seconds, which means that the recipe will only be triggered 30 seconds after the post-function is run. This can prove useful if you need several processes to run concurrently on a same workflow transition and want to prioritize one over another by delaying it by a few seconds.

Prevent post-function from running twice
Use this option if you want to avoid the same recipe from automatically creating a copy of the same Jira issue several times. When this option is enabled, going through the same workflow transition several times will only result in creating one issue for each recipe added to the post-function.

Copy comment on transition
Use this option if you want to copy only the comment made on the transition screen.

  1. When this option is activated, only the transition comment will be copied, whether or not you have chosen to copy the comments in your recipe.

  2. Make sure that the recipe is triggered after the comment is made.

7 - Publish the workflow draft.

At this point, the recipe has been added to the workflow transition and is ready to be used.

8 - Open issue SUP-1.

9 - Transition the status to "In Progress". 

Result

After a few seconds, a copy of SUP-1 is automatically created in the selected target project with the selected issue type.

•••

New to Elements Copy & Sync? 
If this tutorial has stirred your imagination, why not give it a try? 
• Try Elements Copy & Sync for free •

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.