Forums

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

Find and Replace Automation Help

Sarah Isaacs
Contributor
September 26, 2025

Hi, Please can anyone help with this problem it's driving me crazy.

Background - I'm using Jira Cloud, Team Managed Board, I am the admin of the board but not the jira admin.

What I want to do - we have book titles that change through production as a name becomes signed off. The book title exists in the Epic Summary, Work Type (Task) Summary, Sub Task Summary and a Book Title Field which is on all of the work Types. 

Here is the start of my Automation:

image.png

The Create Variable doesn't work: {{issue.summary.replaceAll("(?i)\\Q{{oldT}}\\E","{{newT}}")}} 

Here is the set up within my board: image.png

So I want to be able to Find all Instances of : A Garden for Grandad Graham in the epic, task, sub task and update it to another name: Gardening Graham. I want to run the manual trigger from the epic. I can't even get the Epic Summary to change. 

I have this Log:image.png

Please please can someone help. I just am stuck on the first bit and haven't even got to updating the custom field or the children of the epic. 

thank you

 

3 answers

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.
September 26, 2025

Hi @Sarah Isaacs 

Adding to the suggestions from @Valerie Knapp and I agree a manually triggered rule may not be a sustainable approach to solve your scenario.  And also...

 

For smart value expressions, once inside a set of double, curly brackets, additional ones are not needed.

 

Next, automation rule regular expressions cannot include smart values directly.  Instead, one needs to create a variable for the regex and then use that in the functions.  For example:

  • action: create variable
    • name: varRegExString
    • smart value: your regular expression, with no surrounding quotation marks
  • action: create variable
    • name: varRegExReplacement
    • smart value: your regular expression, with no surrounding quotation marks
  • action: something that needs to use the results...
    • {{issue.someField.replaceAll(varRegExString, varStringExReplacement)}}

 

Finally, and most importantly, there is no documentation of what is and is not supported for regular expressions in automation rules.  Instead, the docs state the implementation is based on Java's Pattern class.  This means one needs to experiment to confirm the behavior, such as by:

  • create the simplest expression that can solve your case
  • test that fully, perhaps just writing the results to the audit log rather than changing work items
  • when that works, incrementally add to the regex for edge cases, again testing
  • when an expression does not work, pause to understand why, and perhaps consider alternatives to using regex in the rule, such as other text functions

 

Kind regards,
Bill

Valerie Knapp
Community Champion
September 26, 2025

Cheers @Bill Sheboy !

0 votes
Valerie Knapp
Community Champion
September 26, 2025

Hi @Sarah Isaacs , thanks for your post.

I would suggest to you that an automation isn't the best solution for this requirement. I think a listener would be better. A listener works as it sounds like it would, it is 'listening' for some change and then you can update other related objects https://www.scriptrunnerhq.com/help/example-scripts/update-multiple-fields-cloud 

I have understood that when the title of the book is updated, you want to update it everywhere it has been referenced. However, I think it is important that you define a process for in which object the title should be updated, otherwise, I don't see how you wouldn't just be constantly overwriting different titles without any quality control. I appreciate you have this rule as a manual trigger but I think for your internal processes it would make sense to define, ok, this title is outdated, I will update it (as a rule) in the Epic and then the update of the Epic would be the event that triggers the change in the other related objects. 

I am not saying you can't do this with automation but I think we would need help from someone like @Bill Sheboy or @Trudy Claspill , who have a lot more experience with these kinds of use cases.

Best wishes

 

0 votes
Deivid Araujo
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.
September 26, 2025

Hi Sarah!

If the goal is to replace the text with the user-provided value, wouldn’t it be simpler to just update the fields directly with that value? For example:

userinput.png

Trudy Claspill
Community Champion
September 26, 2025

@Deivid Araujo 

Looking at the sample data provided by the author, in some cases the text to be replaced is only a portion of the full text in the field.

Deivid Araujo
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.
September 26, 2025

Yes, but it wasn’t clear at first—that’s why I wanted to confirm.

From what I understood, the problem to be solved is the need to edit the book title in multiple places. Since handling partial text is more complex than replacing the entire text, the simpler approach would be to:

  • Copy the summary once

  • Paste the current summary into the manual trigger field and make the necessary edits

  • Run the automation

Suggest an answer

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

Atlassian Community Events