Versions Compared

Key

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

This article explains how to link the parent of the current sub-task to the new issue in Create issue(s) (JMWE app) post-function.

\uD83D\uDCD8 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 :

    Code Block
    languagejava
    {% set target = []%}
    {% set parentKey = issue | parentIssue("key") | field("key") %}
    {% if parentKey %}
    {% set val = {"type": {"name":"Blocks"}, "inwardIssue": {"key": parentKey} } %}
    {% set unused = target.push(val) %}
    {% endif %}
    {{target | dump(2)}}

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

  7. Click Add and publish your workflow.

Now, when the transition is executed on the sub-task, a new issue is created with your configured details and then linked to the current subtask's parent.

Image RemovedImage Added
Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@4371b12
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ( "kb-how-to-article" , "jmwe-cloud" , "nunjucks" , "nunjucks-template" , "script" , "link" , "link-issues" , "parent" , "create-issue" , "create-issue-postfunction" , "jmwe-postfunction" , "post-function" ) and type = "page" and space = "JMWEC"
labelskb-how-to-article

References