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!
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:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.