Scenario
Div |
---|
|
Estimated Time: 6 min |
You would like to create an issue only in the case where it was transitioned by a specific user.
Background
This scenario uses an example ePub workflow that helps teams coordinate the publication of electronic books. We can add a Create Issue post function that processes when users transition issues from the "In Edit" to "In Composition" steps and uses regex to inspect a built-in Substitution Variable called "%transition_user_id%". If the user transitioning matches the value(s) provided, then a new issue is created. If the user does not match, a new issue is not created, but the transition step is processed.
Steps
The following steps demonstrate how to configure Create on Transition, regex inspection of the user transitioning using a built-in function:
Table plus |
---|
border | 0 |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
columnAttributes | style="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;" |
---|
id | steps_table |
---|
enableSorting | false |
---|
enableHighlighting | false |
---|
|
| Step 1As a Jira Administrator or Workflow Administrator: - Navigate to your workflow (ePub in this case).
- Edit your ePub workflow to create a draft version.
- Navigate to the Post Functions tab.
- Add a Create Issue post function.
| |
| | Step 2- Navigate to the Conditions & Configuration tab.
- Enter "%transition_user_id%" in the Condition 1 field.
- Enter the name(s) you would like to match within the Regular expression pattern field.
In this case, we would like to search for any of the three ("bsmith|tlee|jjones"). Using the pipe "|" between values indicates an OR condition (e.g., bsmith or tlee or jjones). - Select the Exact match check box to the right, so you only return on exact username matches.
- Click the Add button to save your changes.
|
|
| | Step 3Validate your new post function - Remember to publish your workflow. We always recommend saving a backup
of the previous workflow when prompted. - Create an issue and transition the issue using one of the users specified within
your configuration to trigger your post function. - Validate that the transition took place and the new issue was created.
| |
|
...