I have stumbled into a use-case that I don't quite seem to be able to do.
The simplified case that leaves out all the bits I think I've worked out is:
I know how to do all the "if" bits.
I do not see how to create a list of options that need to be set or unset in the multi-select field, or how to then apply that list to it.
Hi Nic,
Developer from Automation here.
The best way I can think of would just be to use append/remove APIs when editing the issue, so when those particular IF checks happen you can then just do an action to append the particular field. We do have a "variable" action but it's not currently setup in a way that you can keep appending then do 1 final edit, you'll need to do multiple with your if conditions.
One way to do this if you just need add and not remove is to use a smart value to copy the current fields options, then add the new option e.g. {{issue.Multi Checkbox}}
If you would like more flexibility there is add/remove API with multi issue fields but it's not something we support natively so you'll need to use the advanced option in the edit action mentioned in in https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/ . Here's an example that both adds and removes an option at the same time, you can also have multiple adds if you replace the remove word
{
"update": {
"Multi Checkbox": [
{
"add": {"value":"Option1"}
},
{
"remove": {"value":"Option2"}
}
]
}
}
Hope this helps.
Feel free to reach out to Atlassian support if you require additional assistance https://support.atlassian.com/.
Cheers.
Hi @Yvan Martin
I'm trying to do something similar and can't get it to work – I was hoping you could help :)
I need an automation that does the following:
1. If the description of the issue contains the word "Danish" select "Danish (da-DK)" from a multi-select drop-down.
2. If the description of the issue contains the word "Dutch" select "Dutch (nl-NL)" from the multi-select drop-down.
Etc. with a bunch of other languages. But I need them to be accumulative. I've tried a few things and always end up with only the last listed language being selected in the multi-select. So it's like each step of the rule overwrites the previous one.
I tried your first suggestion above, using the smartvalue {{issue.customfield_xxxxx}} and adding also the option to be added, but it doesn't work.
Any tips?
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.