The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Use smart values to cut '{' from text

Clemens Rätze
February 1, 2024

I would like to use smart values to cut text between '{' and '}' from a description.

To start simple I tried this:

{{issue.description.replaceAll("{","")}}

But it is not working. It works with other text than {. Is there a notation to use { in smart values?

 

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Rudy Holtkamp
Community Champion
February 1, 2024

Hi @Clemens Rätze ,

I did not try it myself, but I think you need to escape the {, by using \{.

{{issue.description.replaceAll("\{","")}}

 

 

Clemens Rätze
February 1, 2024

That's it, thanks.

In case anyone is wondering, that's my final value:

{{issue.description.replaceAll("(?<=\{)([^ ]*)(?=\})","").replaceAll("\{}","")}}

Using this I can cut all formating stuff like {color:#172b4d} that would otherwise end up in an email containing the issue description using Jira automation. 

Like Rudy Holtkamp likes this
0 votes
Marc -Devoteam-
Community Champion
February 1, 2024

Hi @Clemens Rätze 

You might need to address the { as "\{\", this ass it is a special char.

Rudy Holtkamp
Community Champion
February 1, 2024

Is the second \ needed? Seems like you are escaping the "

Marc -Devoteam-
Community Champion
February 1, 2024

I know, that I have to use the same for trying to replace \\ with nothing.

"\\\\"

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events