Automation for Jira has the awesome feature "Smart Values". The documentation also shows several functions you can use with Smart Values.
The ones I am looking at are "left" and "lastIndexOf".
I have a "System Version" field that I need to take the value 3.51.2.12 and get 3.51.2. (To plug into a JQL query to get all values on a similar version.)
These two statements work fine:
{{issue.System Version.left(6)}}
{{issue.System Version.lastIndexOf(".")}}
They give the answers you would expect.
However if I combine them like so:
{{issue.System Version.left(issue.System Version.lastIndexOf("."))}}
Then I get the following error:
Invalid character at 49. Must be '.' or end of line: left(triggerIssue.System Version.lastIndexOf("."))
I tried several syntax variations and can't find a way to make this work.
Is there pass the results of one function as a parameter to another function? (or some other way to get the substring I am looking for?)
Have you tried the following:
{{issue.System Version.left({{issue.System Version.lastIndexOf(".")}})}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.