Forums

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

Smart value with concatenate string in string replace/replaceAll

Masudur Rahman
Contributor
April 28, 2020

Hello
How can I do the following.

{{issue.description.replace("found text", "replace text with smart value:"+createdIssue.key)}}

Basically I want some text should replace with smart value and plain text as concatenated.

Thanks
Masud

2 answers

1 accepted

1 vote
Answer accepted
Mehmet A _Bloompeak_
Atlassian Partner
April 29, 2020 edited

Hi @Masudur Rahman ,

Below worked on my Jira. I hope it works for you too.

{{issue.description.replace("found text", issue.summary).concat("my plain text")}}
Masudur Rahman
Contributor
April 29, 2020

Thank you , But can we have the following instead of suffix, I want prefix concat.

{{issue.description.replace("found text", "my plain text".concat(issue.summary))}}
Mehmet A _Bloompeak_
Atlassian Partner
April 29, 2020

As far as I checked there is no prepend function. But you can have the same behavior with the below snippet..

{{issue.description.replace("found text, issue.summary.left(0).concat("my plain text").concat(issue.summary))}}

Above the prepend behavior is done

  • first by creating an empty string
issue.summary.left(0) ==> returns empty string
  • then concat the prepend text to the empty string
issue.summary.left(0).concat("my plain text")
  •  finally concat the smart value
issue.summary.left(0).concat("my plain text").concat(issue.summary)
Like • 3 people like this
Masudur Rahman
Contributor
April 29, 2020

Thank you very much @Mehmet A _Bloompeak_ 

It worked :)

Like • Mehmet A _Bloompeak_ likes this
Vladislav Penkovskiy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 25, 2022

Thank you, that was really helpful! 

Like • Mehmet A _Bloompeak_ likes this
0 votes
Chad Waldman February 5, 2023 edited

I first create a new variable with the value:

my plain text{{issue.summary}}

Then when I set my field, I can use the smart value

{{issue.description.replace("found text",myVariable)}}

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events