Whenever trying to get original issue value for a new issue creation that is configured for the Creation on Transition post function, need to use the substitution variable.
This article explains how to get original issue value when along with a condition applied to a substitution variable is used.
Instructions
- Log into Jira as a Jira Administrator and click > Issues
- From the left sidebar, under the WORKFLOWS section, click Workflows.
- Select your project's workflow from the right side window and click Edit.
- Click the transition for which Create on Transition is configured.
- Go to Post Functions and click to edit the Create Issue post function.
- Select the Conditions & Configuration tab on the left navigation panel.
Add the below mentioned condition, for the issue to be created, only when the condition is met:
Tip Need to add %original_customfield name% to the Condition. For example, if 'Pending reason' is the custom field name then use %original_Pending reason%.
For regular expression, give the expected value of the field. Also, select the required checkbox like Exact, Literal and Negative to match your requirements.- Update the configuration and the updated post function looks like:
- Publish the workflow before executing the transition. You will see that a new issue is created only when the condition is met after the transition occurs.
Info |
---|
It is recommended to test this scenario in a test environment before implementing the same in the production. |