Skip to end of banner
Go to start of banner

How to create Sub-task if the parent issue is not having any Sub-task at the time of transition of a workflow

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

To create a subtask only if 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.

  1. Go to the Cogwheel and click on Issues.
  2. Under the Workflows section, select the workflow to click on Edit link.
  3. Now select the transition steps to add the post- function.











      4. Click on Add Post Function link and then select Create Sub-task option. After this click on Add button.

      5. Now add the below Post Function:

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%


6. Publish the workflow and rerun the scenario.



Add the above Post Function in your Dev/Staging environment first and then implement it in the Production environment.
  • No labels