Versions Compared

Key

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

...

Overview

...

This article explains how to create a sub-task using the app Create on Transition - Create Sub-taspost function, when one does not already exist for the respective parent issue can be achieved using the app Create On transition. If subtask doesn't already exist for the parent issue, then adding the below post function will create a subtask else it will not generate the subtask at the time of transition of the workflow. 

Instructions

Steps to create a post-function for this scenario.

.

Instructions

You need to add a post function in the workflow associated with the parent issue. To create a post function:

  1. Log into Jira as an Administrator and click Image Added > Issues.
  2. Under the Workflows section, select the intended workflow to and click on Edit the Edit link.
  3. Now select Select the transition steps to which you wish to add the post-function.

Image Removed

...

  1. Select the Post Function option as the following:
    Image Added
  2. Click the Add Post Function link and

...

  1. select Create Sub-

...

      5. Now add the below Post Function:

Code Block
Create Sub-task 
Conditions:
Ignore if original issue is a sub-task
Condition value: %jql_result_count%, Regex pattern: 0
Summary: %parent_summary%:sub-task 
Description: 
Issue type: Sub-task (10003) 
Priority: Parent's priority 
Reporter: Current user 
Assignee: Parent issue's assignee 
Affected versions: None 
Fixed versions: None 
Components: Parent issue's components 
JQL query: parent= %original_key%

...

  1. task from the available options.
  2. Once you add all the required fields to the post function, you see that the post function is added to the post functions list as the following:
    Image Added
  3. Click Update and publish the workflow.

Once the post function is created for the required transition, you notice that a sub-task is created for the issue after transitioning to the selected state.

Note

Add the above Post Function in your

Dev/Staging

test environment first

and then implement

before implementing it in the

Production

production environment.