Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get the substring of a field using Smart Values


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 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?)

1 answer

0 votes
Fabian Lim Community Leader Oct 08, 2021

Have you tried the following:

{{issue.System Version.left({{issue.System Version.lastIndexOf(".")}})}}

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

How we use Jira Service Management for our recruitment process! - Part 2

It is never about setting up a process and being done with it. Rather, the focus should always be on optimizing it for the best outcomes. Thus, we didn’t stop at setting up JSM for our recruitment pr...

194 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you