I am using an automation where the user chooses the option to delete in a select list custom field.
I need the indexOf function to find the value selected by the user (A, B, C or AA), which I store in the variable userInputs.deleteOption, in this json: {id=14928, value=A, disabled=false}, {id=14929, value=B, disabled=false}, {id=14930, value=C, disabled=false}, {id=14937, value=AA, disabled=false}, {id=14941, value=BB, disabled=false}.
I have used the smart value indexOf so {{json.indexOf("chain")}} where the variable chain = , value={{userInputs.deleteOption}},
The result of this smart value is -1.
Can someone give me a hand?
Thank you very much.
Translated with www.DeepL.com/Translator (free version)
For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see those...
Is your manually triggered rule providing a user input field, which you are then trying to search for in the content of another field / smart value expression?
If so, please try this, assuming you are searching in the Description field:
{{issue.description.indexOf(userInputs.yourInputVariable)}}
Kind regards,
Bill
Thank you Bill. I have found this workaround from Atlassian: https://confluence.atlassian.com/jirakb/querying-json-data-in-jira-automation-1319570559.html
Regards,
Jordi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that link, Jordi. I suspect the limitation is for JSON data which is not for an issue...or more specifically, which cannot be iterated over as a list with attributes.
Another workaround would be to use a dynamic regular expression with the match() function.
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.