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.
Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!
Start here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.