Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Smart value help for sprint value

raju mandapaka April 6, 2024

Team,

Our sprint patterns are like below..

EARTH XA7.1 MAR10

EARTH XA8.1 APR10

EARTH XA9.1 MAY10

I need to write a smart value to find out  XA number by using sprint assigned.

Eg : I assigned "EARTH XA7.1 MAR10" sprint to a story, Now i need to write a smart value to extract to XA number to it belongs - In above case the XA number is 7.

Please help.

 

Thanks in advance.

 

2 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2024

Hi @raju mandapaka 

Please try using the substringAfter() and substringBefore() functions, perhaps chained together to get the text you want: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#substringAfter--String-separator-

You could also do this with a regular expression and the match() function: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--

Kind regards,
Bill

0 votes
Dexter de Vera
Community Champion
April 6, 2024

Hi @raju mandapaka ,

 

Base on your format, meaning the XA number will be find between "AX" and "." .

This smart value below will get the last sprint name text between "XA" and ".":

{{issue.sprint.last.name.substringBetween("XA",".")}}

Hope it helps.

Suggest an answer

Log in or Sign up to answer