Link current Epic's child issues(s) to the new ticket in Create issue(s) (JMWE app) post-function.

This article explains how to link the current Epic’s child issue(s) to the new ticket in post-function.

 Instructions

  1. Navigate to the intended workflow and open it in Edit mode.

  2. Select the required transition.

  3. Select the Post functions tab and click Add post function.

  4. Add the post-function.

  5. Fill in the required details.

  6. Select the “Linked Issues” field under “Set specific fields of new issue(s)”. Select “Set field value to:” and add the below template:

    {% set childIssues = issue | stories("key") | field("key")%} {% set target = []%} {% for key in childIssues %} {% set val = {"type": {"name":"Blocks"}, "inwardIssue": {"key":key} } %} {% set unused = target.push(val) %} {% endfor %} {{target | dump(2)}}

    Modify the link type name(Blocks in line #4). Use either inwardIssue or outwardIssue in line #4 as per your use case.

  7. Click Add and publish your workflow.

When the transition is executed on an Epic ticket, a new ticket is created with your configured details and then linked to the current Epic’s child issue(s).

JMWE Create issue(s) post-function

If this post-function is added on the create transition, select the checkbox “Delay the execution of this post-function” under “Delayed execution” and select a delay of 3 seconds.

 

References