Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scenario

Div
classtime

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 link the newly created issue back to the parent issue that was being transitioned. 

Background

This scenario uses 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 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 is met, we can  create and link the issues. 

Steps

The following steps demonstrate how to configure Create on Transition, regex inspection of the summary and applying the proper linkage between issues:

Table plus
border0
heading0
multiplefalse
enableHeadingAttributesfalse
columnAttributesstyle="border:0;width=5%;",style="border:0;width=65%;",style="border:0;width=30%;max-width=30% !important;"
idsteps_table
enableSortingfalse
enableHighlightingfalse


Step 1

As a Jira Administrator or Workflow Administrator:

  1. Navigate to your workflow (ePub in this case).
  2. Edit your ePub workflow to create a draft version.
  3. Navigate to the Post Functions tab.
  4. Add a Create Issue post function.



Image RemovedImage Added


Step 2

ISSUE FIELDS:

  1. Select the Links tab.
  2. Select the following from the respective list of available options:
    • Create Link - "Original issue key"
    • Create link type - "Create on Transition"
    • Create link direction - "Issue key to new issue"


Image RemovedImage Added


Step 3

OPTIONAL RULES:

Define the regex used to inspect the summary of the parent issue and
the exact matching condition used to evaluate.

  1. Navigate to the Conditions & Configuration tab.
  2. Enter "%original_summary%" in the Condition 1 field.
  3. Enter "^epub | ^digital" in the Regular expression pattern field to search for any summary that is "epub" or "digital"
  4. Select Exact matching condition, so we only create the issue when either of the text strings return an exact match
  5. Click the Add button to save your changes.

Image RemovedImage Added



Step 4

  1. Remember to publish your workflow. We always recommend saving a backup
    of the previous workflow when prompted.
  2. Create an issue with a Summary that begins with either "epub" or "digital" and
    transition the issue to trigger your post function.
  3. Validate that the new issue was created and that it contains a link back to
    the originating issue.


...