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

Error rendering smart-values: Failed to get value for issue.description.match("Application::".*"")

Mateusz Bajorek April 15, 2024

I am trying to get 7 fields from issue description and add them to custom fields:

APPD.png

 

I have built a test rule to get HIS from Application::"HIS" and add it to Labels:

RULE.png

 

Unfortunately I am getting the below error:

 

AUDIT.png

 

I guess to get only "HIS", regex should be: Application::"(.*)"

I would appreciate any suggestions on this case.

3 answers

1 accepted

1 vote
Answer accepted
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 15, 2024

Hi @Mateusz Bajorek -- Welcome to the Atlassian Community!

Your update with the group parenthesis is correct, and you may escape the quotation marks if you do not want those in the result:

{{issue.description.match("Application::\"(.*)\"")}}

Also...do you expect any linefeeds / carriage returns on the description?  If so, it does not handle those well; consider replacing / removing those before the match() call.

Kind regards,
Bill

Mateusz Bajorek April 15, 2024

Hi @Bill Sheboy 

This is exactly what I was looking for. Thank You so much! 
Let me create custom fields to check if I can add all the info.

Like # people like this
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 15, 2024

Before you do that...

You can quickly test by using match function calls and only writing to the audit log.  That will save time in getting the correct regular expressions before trying to set the field values.

0 votes
Kalyan Sattaluri
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 15, 2024

Hello @Mateusz Bajorek 

Obviously your regex has issues. Please update your top post and give an example text from where you need to extract these 7 labels so community can help.

Because what you have shared is not what you want so any solution given for this is not going to work when you start expanding your requirement. Thanks!

Mateusz Bajorek April 15, 2024

Hi @Kalyan Sattaluri 

sure, here it is:

 

APPD.png

I think I will create text custom fields for each of this section.

Kalyan Sattaluri
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 15, 2024

Please share actual sample text so users can try it and update your original post of this thread so others can take a look as well.

Also, what is your end goal... you say you want to update labels field but you have sentences. You cannot have spaces in your labels right?

0 votes
Mateusz Bajorek April 15, 2024

I will have to get 7 labels in total from one issue description.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events