This article explains how to link the parent of the current sub-task to the new ticket in Create / Clone issue(s) (JMWE app) post-function.
\uD83D\uDCD8 Instructions
Navigate to the intended workflow to make the necessary changes in the edit mode.
Select the required transition.
Select the Post functions tab and click
Add post function
.Add the “Create / Clone issue(s) (JMWE app)” post-function.
Fill in the required details.
Select the checkbox “Run a Groovy script after the issue is created” under “Post-creation script” and add the below “Post-creation script:”
if(issue.parentObject) newIssue.linkIssue("relates to",issue.parentObject)
Replace relates to
with the desired link name.
With this, when the transition is executed on the sub-task, a new issue is created with the configured details and linked to the current sub-task's parent.