Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy subtasks from a JSM ticket to a JIRA Business ticket via automation

Kathleen Hamilton
Contributor
January 13, 2026

We have a JSM ticket in which when it is transition to an In Progress status - automation creates a new ticket in our Business Project and we copy over certain fields. If the JSM has subtasks - I want to also copy those subtasks to the Business project. I got stuck on how to handle that after I have the IF statement that subtasks are present. TIA for help!

 

Screenshot 2026-01-13 140845.jpg

1 answer

1 accepted

4 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 13, 2026

Hi @Kathleen Hamilton 

Based on your scenario, I have a few suggestions to improve your rule...

First, when you add the link to Most Recently Created Work Item, that connects it to the trigger one.  But, the second link action is not needed as it will try to link the trigger work item to itself!

Next, the condition to check for the sub-tasks is not necessary.  Instead, you may just branch to them and when there are none they will not process.  For safety, we can still include it.

Finally, when copying / cloning the subtasks, you will need the new work item's key to set as its parent.  That may be saved with the Create Variable action

 

Putting those ideas together, perhaps try this rule structure:

  • trigger: work item transitioned (with your added conditions)
  • action: create work item, for the Task in the other project
  • action: create variable
    • name: varTaskKey
    • smart value: {{createdIssue.key}}
  • action: link work item, linking the Most Recently Created one to the trigger
  • related work items condition: sub-tasks are present
  • branch: to subtasks
    • action: create work item (or clone), selecting the desired fields, and type to Sub-task
      • remember to set the Parent to {{varTaskKey}}

 

That approach should work for company-managed projects.  When your copying-to project is team-managed, you may need to instead use the REST API to create the work items due to the type differences.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events