I have a form in my JSM project. The form has a question:
Question?
[ ] X
[ ] Y
[ ] Z
Now, I want to create an automation that will post a comment that will look differently depending on what options were selected. It would be something like... (pseudocode)
Hello {{requester.displayName}},
Thanks for raising this issue.
{{selected(Question?, X)}}Since your issue concerns X, we advise you to...{{/}}
{{selected(Question?, Y)}}Since your issue concerns Y, we will...{{/}}
{{selected(Question?, Z)}}Because you mentioned Z, the next steps are...{{/}}
Importantly, any combination of X, Y, Z is valid in the form, and each of the pieces of text should be generated (or not) independently of each other.
I'm trying to find documentation on how to use smart values to see if a particular value in multiselect field is selected, but https://support.atlassian.com/cloud-automation/docs/examples-of-using-smart-values-with-lists/ is not much help. Best I can think of is to convert all the selected values into a single concatenated string and then try to regex for each specific value with https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match-- but that seems really clunky.
Is there a better way?
Thanks!