Forums

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

Automating templated object hierarchy creation

Omer Neumeier August 21, 2023

I created an automation that:

when a new issue gets created

Then for each child linked object (where the created object is the parent and is cloned with links)

Clone the child object and link the new one to the parent that triggered the automation

 

Somehow though the automation gets confused and when I clone an object with a parent and child links the automation doesn't seem to find any of the child links. I setup two branches one "For Linked issues Types: is parent of" and another branch "For Linked issues Types: is child of". The response when I run this automation and clone the parent object is that it does not find any child of links (though there are three) and then does find the parent link and acts on that

Branch rule / related issues

No related issues could be found.

Clone issue

Issues cloned successfully
CEL-168 //this is a clone of the parent issue of the original trigger
If I remove the parent link, then the children are found though....

1 answer

0 votes
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 Leaders.
August 21, 2023

Hi @Omer Neumeier 

For a question like this, please consider posting images of your complete rule, the details of actions / conditions / branches, and of the audit log details showing the rule execution.  Those will provide context for the community to offer suggestions.  Thanks!

Without seeing those things...

I suspect what is happening is your rule has multiple branches, and one (or more) branches are not completing processing before your next steps.  Branches on multiple issues are run asynchronously and in parallel, and so they execute independently of the rest of the rule.  There is no guarantee of when the branch will finish, up to the last step of the rule.  Please look here for more information on branches: https://confluence.atlassian.com/automation/branch-automation-rules-to-perform-actions-on-related-issues-993924648.html

If you post your rule images, the community may be able to suggest work-arounds for your scenario.

Kind regards,
Bill

Omer Neumeier August 21, 2023

Here is a pic of the automation branches and steps thanksScreenshot 2023-08-21 151030.jpg

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 Leaders.
August 21, 2023

Thanks for that information.

In the Clone Issue actions, are you trying to link the issues at the same time to the trigger issue?

Omer Neumeier August 23, 2023

Yes please

Step 1 Clone Template object with links (the links are also Template objects)Screenshot 2023-08-23 122433.jpg

Step 2 Clone each child link in the trigger and relink it to the trigger object

Step 3 Remove links to Templates

 

The end result should be the parent and children template objects cloned into a separate set of similarly linked objects. Thanks!

Omer Neumeier August 23, 2023

Also I can't use a new plugin b/c the company I work for does not have it available and they are not running cloud Jira :(

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 Leaders.
August 24, 2023

Yes, this appears to be a branching issue as I described earlier.

A scenario like this cannot be done in one rule as the first branch usually will not finish before the second one starts.  There are marketplace apps for cloning which could solve this, however you have noted no additional apps can be added.

One possible work-around is to use one rule to add the cloned issues and then use a second rule (triggered on the adding of the links to the template for the cloned issues) to remove links from the template issues.

Please note: such interconnected rules are quite complicated to get correct (e.g. for the link direction), and as you have many issues in your template I encourage testing these rules in a separate, test project first.  After you have them working, copy them to the final project.

Suggest an answer

Log in or Sign up to answer