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.
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.
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).
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 two additional options available on this screen: Delay and Prevent post-function from running twice.
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.
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".
After a few seconds, a copy of SUP-1 is automatically created in the selected target project with the selected issue type.