Hi everyone,
I'm currently building a Jira Automation rule where I want to manually trigger the rule and select multiple values (like checkboxes representing versions or environments). Based on the selected inputs, I want to dynamically create a list of selected values and use Advanced branching (For each) to iterate over each of them.
The idea is:
Use a manual trigger with multiple checkbox inputs (e.g., 24Q3
, 25Q2
, etc.).
Automatically extract only those which were selected (i.e., their value is true
).
Create a list/array like ["24Q3", "25Q2"]
.
Use this list in a "For each" branch in the same rule.
However, it seems that:
The manual trigger input is returned as an object (e.g., {24Q3=true, 25Q2=true, 26Q1=false}
), and Smart Values donโt provide a way to loop through object keys or filter them dynamically.
I can't find a way to transform the selected values into a usable list for the advanced branching.
Is there any workaround that allows dynamically collecting only the selected checkbox inputs from the manual trigger into a list format (["24Q3", "25Q2"]
)?
Or, is there any recommended pattern to simulate dynamic For each execution based on manual selections?
Any ideas or examples would be greatly appreciated!
Thanks in advance ๐
The {{userInputs}} data appears to be a JSON set of fields, and cannot be iterated over directly. A workaround is use a created variable, and then split(), filter, and parse the results as needed.
For example:
{{varUserInputs.substringBetween("{", "}").split(", ").match("^(.*=true)").substringBefore("=true").asJsonStringArray}}
How that works is:
Please adjust as needed for your expression.
Kind regards,
Bill
Hi @Bill Sheboy ,
Thanks you for the response!
I implemented a different workaround where I built the list "24Q4",25Q2" and iterated over it using .split(","). But your process seems fine to me.
I did delay my response because of:
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Nowโs the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.