Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,307
Community Members
 
Community Events
184
Community Groups

Get the substring of a field using Smart Values

Edited

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

1 answer

0 votes
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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
TAGS
AUG Leaders

Atlassian Community Events