Undoing an unwanted automated bulk edit

Jeremy Pitten January 12, 2021

I just set up a new JIRA automation, to pre-fill new JIRA ticket description with a template based on ticket type when a ticket is created.

Having created the automation and activated it, I thought I'd try it out, I created a new ticket and then opened it to see no pre-filled description, I then notice my JIRA slack channel has sent me a burst of several hundred messages indicating all existing tickets have been updated, replacing existing descriptions with the template content.

How do I bulk revert these unwanted automated changes, do I have to restore from a backup, assuming I have one?

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.
January 12, 2021

Hi @Jeremy Pitten 

Wow, and sorry to learn that happened.  Luckily the automation rules are limited to 100 issues before they stop execution.  (You disabled that rule, right?)

  • Without any add-ons, you probably want to check for a backup/restore to a test instance, if you regularly backup.  Then you could export and re-import the issues to update the descriptions.  Check with your site admin about backups.
  • If you are coding-savvy, you could use the REST API to get the change logs, parse the JSON, and build something to create an import file.   
  • Otherwise you are back to manually fixing them.

Lessons like this are why I experiment with rules in a test project first, and then copy them into the target project later.

Best regards,

Bill

Jeremy Pitten January 13, 2021

Thanks for getting back to me Bill.

I've been able to fix the issue using the REST API and some javascript; extracting a list of the affected tickets from slack, I was able to fetch the changelog for each ticket, extract the old description and then apply it back, suppressing notifciations.

I havent used this api before so it was useful for me, the documentation is great and api extensive and easy to use.

When I created the automation I didnt disable any rule issue limit, at least not that I'm aware of, I did disable notifications though.

I was using a set of branch rules, each matching on a different ticket type, I didnt realise this would match on all tickets with that type, I thought it would only apply to the ticket I was creating.

I'll take greater care creating these automation rules in future.

Thanks again.

Like Bill Sheboy likes this
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.
January 14, 2021

Well, done! 

By the way, the issue processing limit of 100 is built into the rule engine (I believe).  When you have branching or triggers using JQL, it can help to test that stand-alone with Advanced Filters to confirm scoping impacts (projects) and issue count limits.

__Bill

Suggest an answer

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

Atlassian Community Events