Forums

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

How to duplicate steps in JIRA Automation

Akhil Mishra
Contributor
July 5, 2022

Is there any way to duplicate the steps in the JIRA Automation rule? In the below rule, you can see that after every If step, I have to create a confluence page. I have to do this for all components in my program so is there any way i can duplicate these steps so that i can just simply change the value instead of adding new step every time? 

Duplicate steps in JIRA.png

 

2 answers

2 votes
Walter Buggenhout
Community Champion
July 5, 2022

Hi @Akhil Mishra,

That is a consequence of the low code automation setup. As an alternative,  you could consider using a scripting app (like Scriptrunner or powerscripts)  to build more dynamic use cases, but that does require scripting skills obviously to get going.

Hope this helps!

Akhil Mishra
Contributor
July 5, 2022

Thanks @Walter Buggenhout 

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.
July 5, 2022

Hi @Akhil Mishra 

There are a couple of open suggestions to help with this use case, such as adding "copy components" and adding OR condition handling:

For your question, what do you mean by "...so that i can just simply change the value"? 

If you mean to dynamically change the information provided for the Confluence page creation, perhaps you could either restructure your rule to get the information from the issue(s), or use a Created Variable to store the dynamic information and later use the variable with just one call to creating the page.

Kind regards,
Bill

Akhil Mishra
Contributor
July 7, 2022

Thanks Bill, what I am looking for is an easy way to copy a step in the rule. In my program, we have around 30+ components and for each component i want to create a release page based on the even. Notice that there are some steps (marked with arrow below) which are almost similar but i need to every time create these steps. It would have been super awesome if there would have been an easy way to duplicate these steps and then modify based on the need.  

Duplicate steps in JIRA II.png

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.
July 7, 2022

Thanks for clarifying!  You mean you have 30+ "Jira Components" not "rule components", correct?

If so, you may be able to use an advanced branch over smart values to iterate over the Jira Components in the trigger issue.  This would make your rule significantly smaller, and most likely would not need a test for each condition.

https://community.atlassian.com/t5/Automation-articles/Branching-over-smart-values-in-Jira-Automation/ba-p/1741935

Like Walter Buggenhout likes this
Walter Buggenhout
Community Champion
July 7, 2022

👍

Akhil Mishra
Contributor
July 11, 2022

Thanks Bill. I thought of the Advanced Branch option but for my automation rule, there is a problem with it - I can't change the Confluence page setup location dynamically per component. So I need to use IF ELSE branching per component. 

  

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.
July 11, 2022

If your pages are all within one Confluence Space, you may be able to do this dynamically from your Components (if the names are aligned).  I believe there are some community posts on doing this from a rule, so perhaps search for those.  If that does not work from the Create Confluence Page action, I believe you could also call the REST API to create the page.

Like Akhil Mishra likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events