Automate Multiple Changes to Issue Field

Guy Renko
Contributor
October 13, 2023

Trying to create an automation that will remove the phrase "New Text Message" from the beginning of the Issue Summary, add a phrase at the end of the Summary and remove a changing phone number in between.

Basically

This: "New text message from ABC s99 Fail-Over (987) 654-3210"

to this: "s99 Fail-Over Data Limit Warning"

Where "s99" will change to signify the location of the request.

I really only need the "s##" from the original summary but even so not sure how to make it happen.

I thought maybe using multiple Edit Actions on the Summary might do it but it only ends up with one of the edits working even though the Audit Log shows all are successful.

Edit Issue: {{issue.summary.remove("New text message from ABC ")}}

Edit Issue: {{issue.summary.concat(" Data Limit Warning")}}

Edit Issue: {{issue.summary.remove (issue.summary.substringBetween ("Over","Data"))}}

 

I combined the two of the three into one statement:

{{issue.summary.remove("New text message from DII ")}} Data Limit Warning

and end up with: s99 Fail-Over (987) 654-3210 Data Limit Warning.

 

How can I get rid of the changing phone number in the middle while keeping the changing s##?

 

Thank you in advance for any help.

1 answer

1 accepted

0 votes
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.
October 13, 2023

Hi @Guy Renko 

Although you can do what you ask in one step (using the text functions, including match), you are trying this in three edit issue actions...which is no problem.

The challenge is automation rules use the issue data from the point the rule triggers.  Even if you make a change saved out to the cloud, the value is the same inside the rule.  When you want the updates to happen, you need to use the Re-fetch Issue action to re-load the data.  For example,

  • trigger...some trigger
  • action: edit issue
  • action: re-fetch issue
  • action: edit issue
  • action: re-fetch issue
  • action: edit issue
  • action: re-fetch issue
  • and so forth

Please note: calling re-fetch will slow your rule down by about 1 second per each one.  And so you may want to learn more about the text functions to try to do this in one step/action by chaining the functions together: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/

Kind regards,
Bill

Guy Renko
Contributor
October 13, 2023

HOW INTERESTING!!!  Didn't know about the re-fetch.

Everything is working as intended.  Was even able to get the first two steps into one action.

Thank you for the help!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events