How to clone epic and its child issues to another project using JMWE

This article explains how to clone an epic issue and its linked child issues to another project using the JMWE app.

 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 https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466322933 post-function.

  5. Select the Target issue(s) as the current issue.

  6. Add the https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466256916 post-function.

  7. Select the project as per your requirement.

  8. Select Epic as an issue type:

  9. Add Epic Name and select “copy value from current issue“:

  10. Save the post function.

    1. Add another https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/466256916 post function.

    2. Select the required project from the project dropdown.

    3. In the Issue Type dropdown, select calculated and added the script:

      {{it.fields.issuetype.name}}
    4. Set specific fields of the new issue(s).

    5. In summary, add this:

      CLONE - {{it.fields.summary}}
    6. Description: {{it.fields.description}}

    7. Epic Link: {{ context.newIssueKey }


    h. Select the checkbox “Create multiple issues” and add the below-mentioned text:

    {{issue | stories| dump(2)}}
    i. Check the box for Iterator returns JSON.
    j. Select the checkbox Delay the execution of this post-function with a delay of 3 seconds.

  11. You may add a conditional execution in the Sequence of Post-functions post-function to create the Epic child tree only when the current issue is an “Epic“:

    {{ issue.fields.issuetype.name == "Epic" }}