Hello All!
In Jira automation I'd like to extract the numeric value from a single dropdown and load into a a number field.
Example client single select list:
Client XYZ | 1234
Client ABC | 5678
*I need the numeric value after the pipe "|" so 1234 or 5678 in above example
Current attempted JQL:
{{issue.fields.customfield_123.substringAfter("|")}}
OR
{{issue.fields.customfield_123.match(/\d+/)}}
Neither of which worked
Use ".value" to get values from your select list, please refer to Examples of using smart values with lists. Here's the example to add into the Edit issue action:
{{issue.fields.customfield_123.value.substringAfter("|")}}
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Trevor Overstreet
In what way exactly is it not working?
Have you added Log actions to your rule to print out the values of the smart value and the values you get when you add the substringAfter and match functions?
Try printing those values to your execution log to confirm that you are first referencing the field correctly and getting the value you expect before you try to apply the functions to parse it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the response. The above jql worked
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.