Forums

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

why does nesting smart values not work for string extraction?

adrien miniere November 18, 2023

Hi,

i created an automation to detect some pattern in issue summary and cut it out, but I can't make it work. For unknown reason, the nesting of two smart values doesn't work, while other contributions suggest it should ( like here and here):

 

Here's the flow description:

1) create a container variable

 

 

smartvalue1.PNG

 

2) make sure it's a numeric:

smartvalue2.PNG

3) extract a part of the description (it's a long string). I also tried the function "issue.summary.right()", with the same result

 

stringsplitting1.PNG

 

4) check the logs: no text has been read, as if issue.description.substring() wouldn't work with a smart variable as parameter. When I input an explicit integer like 5, it works. With the smart values, it doesn't. As you see in the logs, I made sure the value is a numerical.

 

log_entry1.PNG

 

Any clue or help would be highly appreciated.

Regards, Adrien

PS: this is the ticket I use for testing purposes, how it looks like. As you see, summary and description are far from being empty:

patternticket1.PNG

 

2 answers

1 accepted

0 votes
Answer accepted
adrien miniere November 24, 2023

Hi, i got the solution from Atlassian support:

you can use the below smart value to get the ID from the summary. Also, indexof function gives you the position of a particular character in the string. Match function:

{{issue.summary.match(".*(#[0-9]{1,}).*")}}

it gives: #2345 - It search for # followed by at least 1 digit

I checked the articles that you have referred and nesting using temp variable *now.plusBusinessDays(varTemp.asNumber)* only works with the number function, not with the string function "substring()".

Regards, Adrien

0 votes
adrien miniere November 18, 2023

I know issue.description is in the automation action while the issue.summary is used for the temporary values, but that is no error cause. I tried it with issue.description to compare with issue.summary. But this doesn't play any role. Here is how it looks like when splitting the issue.summary. same (unsuccessful) result:

stringsplitting2.PNG

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events