This article explains how to link the issues linked to the current issue (through a specific link type) to the new issue in Create issue(s) (JMWE app) post-function.

Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

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

  4. Add the “Create issue(s) (JMWE app)” 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 isBlockedByKeys = issue | linkedIssues("is blocked by") | field("key")%}
    {% set target = []%}
    {% for key in isBlockedByKeys %}
    {% set val = {"type": {"name":"Blocks"}, "inwardIssue": {"key":key} } %}
    {% set unused = target.push(val) %}
    {% endfor %}
    {{target | dump(2)}}

The above code :

With this, the issues linked to the current ticket through is blocked by link type will be linked to the new ticket through is blocked by link type. Modify the link type names as per your use case.

References