Forums

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

Bulk Add Components with Jira Automation

JM Hoskinson October 31, 2023

I currently have several rules that add components based on keywords in the issue summary. Rather than having 10 rules that have to be maintained, I'd like to combine them into one. Outside of a ton of branches, is there a way to loop through a lookup table that has the keyword > component mapping? Also open to other ways to combine these automations.

1 answer

1 accepted

1 vote
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 Leaders.
October 31, 2023

Hi @JM Hoskinson -- Welcome to the Atlassian Community!

There are several ways to solve this, and with the changes to the packaging model / limits for automation rules, combining rules seems a good idea: https://community.atlassian.com/t5/Automation-articles/Introducing-our-new-packaging-model-for-Jira-Cloud-Automation/ba-p/2446099

One efficient way to do this is to add all of the components at one time, using advanced edit with JSON: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Components

You could parse your summary, using either the Lookup Table you describe, or smart value, conditional expressions, build up the JSON, and make one edit.

These JSON functions for text fields may also help to do that: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-json-functions/

Kind regards,
Bill

JM Hoskinson October 31, 2023

Thanks @Bill Sheboy I'm familiar with those features and how to add components using the automation. The problem I'm trying to solve is how to do it in a bulkified way, i.e. I don't want to have a unique step /action for each component I want to add

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.
October 31, 2023

Yup, that is where the JSON method helps.  You can build a single expression to add them all at once. 

Without knowing your "decoder ring" to map the keyword values in the summary to the components, I expect the tricky part may be building the expression.

JM Hoskinson October 31, 2023

The decoder ring part is what I need help with - I'm fine with adding >1 component at once

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.
October 31, 2023

If you share some examples of your keywords and the corresponding components, I can probably help with that.  For example...

IF summary contains "blue"  THEN add component "color".

Suggest an answer

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

Atlassian Community Events