Scenario
Div |
---|
|
Estimated Time: 12 min |
You have a new Create Issue post function in place and each time the workflow transition takes place, you would like to inspect the Summary to see if it is an exact match of a specific string and if so, you would like to create the new issue and then link the newly created issue back to the parent issue that was being transitioned.
Background
Our scenario will use an example ePub workflow that helps teams coordinate the publication of electronic books. We have a Create Issue Post Function that processes when users transition issues from the "Open" to "In Draft" steps. For each instance of this transition, we will automatically create a new issue linking it back to the parent issue. What we want now, is to check the Summary (using regex) to see if it begins with either "epub" or "digital" and if either condition are met, we will create and link the issues.
Steps
The following steps will demonstrate how to configure Create on Transition, regex inspection of the summary and applying the proper linkage between issues.
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 our case).
- Edit your ePub workflow to create a draft version.
- Navigate to the Post Functions tab and add a Create Issue post function.
| |
| | Step 2Within the Issue Fields screen: - Navigate to the "Links" section.
- Within the "Create link" field, type the letters "Orig".
- Select "Original issue key" from the list of available options.
- Within the "Create link type" field, select the appropriate link for this scenario.
In our case, we will select a custom link type called "Create on Transition". - Set the value of the "Create link direction" to "New issue to issue key".
|
|
| | Step 3Define the regex used to inspect the summary of the parent issue and the exact matching condition that will used to evaluate. - Navigate to the "Conditions & Configuration" section.
- Within the Condition 1 field, enter "%original_summary%"
- Within the Regular expression pattern field for Condition 1 enter "^epub | ^digital". This
will search for any summary that begins with is "epub" or "digital" - Check off the "Exact" matching condition, so we only create the issue when either of
the text strings return an exact match. - Click the "UpdateAdd" button to save your changes.
| |
| | Step 4- Remember to publish your workflow. We always recommend saving a backup
of the previous workflow when prompted. - Create an issue with a Summary that begins with either "epub" or "digital" and
transition the issue to trigger your post function. - Validate that the new issue was created and that it contains a link back to
the originating issue.
|
|
|
...