Forums

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

Can I use smart values inside an Automation for JIRA text function?

Bhalchandra Wagle April 28, 2022

I have an issuetype called Acquisition which is the portfolio parent of an Epic. When this acquisition issue is created, I need to append the summary of this issue to all EPICS and Tasks that are created along with it (using automation).

I was able to do that by recursively searching all the epics/tasks and updating their summary using {{triggerIssue.summary}} "some pre determined text for each epic/task"

Now the client wants that if the acquisition summary is changed, then the previous summary which is part of each Epic/Tasks summary should be replaced with the new summary from the acquisition issue type.

I used the below but it is giving me an error indicating smartvalue cannot be derived. I am getting each epic/task recursively and trying to use the below to update summary on each

{{issue.summary.replace("{{fieldChange.fromString}}", "{{fieldChange.toString}}")}}

My thought was this would look for the parent's previous summary (fromString) replace it with new summary (toString) and then update the epic/task summary

If I test this with hardcoded values it works. Also if I update the epic/task summary directly with fieldChange.fromString or toString I am getting the right values

So seems to me like either I am using some wrong syntax OR its not possible to use smartvalues inside a replace (or other text functions)

Would like to know either way

Appreciate any help

Thanks

Balu

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Fabian Lim
Community Champion
April 28, 2022

Hi @Bhalchandra Wagle

I had requests like this before and it's a nightmare to be updating summaries of issues. Automation for jira will not work, you will need something like scriptrunner or powerscripts. 

At the end, I resolved this issue with hierarchical reporting tools such as structure or eazybi.  The main concern was that people wanted to see where tickets belong to and the hierarchy views helped. 

I hope this helps. 

0 votes
Kosh Sarkar
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!
April 30, 2025

For anyone looking for this answer and stumbling upon this post, I was able to get this to work by not using the curly braces within the replace function. So just use this: {{issue.summary.replace(fieldChange.fromString,fieldChange.toString)}}

SilkeS
Community Manager
Community Managers are Atlassian Team members who specifically run and moderate Atlassian communities. Feel free to say hello!
April 30, 2025

This topic has been locked because the thread has become a bit dated. If you’d like to keep the conversation going or have additional questions, we encourage you to start a new topic. You can read more about necro posting (“raising threads from the dead”) in our  Community Guidelines .

Thanks!

0 votes
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 29, 2022

Hi @Bhalchandra Wagle 

{{fieldChange}} is relative to whatever field(s) changed and caused the trigger to fire, and so the ambiguity could be the problem.  Perhaps try using {{changelog.summary}} instead.

And adding to what @Fabian Lim noted, tweaking the summary may be problematic and brittle as a solution.  Instead consider if explicit custom fields to contain the information are better.

Kind regards,
Bill

Bhalchandra Wagle April 29, 2022

@Bill Sheboy Hi Bill, thanks for the response. It does seem to recognize fieldchange correctly if not used within the replace. Like if I set the summary directly to fieldChange.fromString or fieldChange.toString, it seems to work fine and sets them to the parent value. It just seems like these smart values cannot be used in the replace function.

I tried another test where I used triggerIssue.summary inside the replace and that failed too.

Anyways Ill use changelog.summary and see if that works.

Appreciate your response

Thanks

Balu

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question