Forums

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

Need to Bulk Replace Incorrect Version String Across Issues in Jira Cloud

Chayoung Kim March 21, 2025

 

Hi everyone,

We are currently using Jira Cloud Software in our company. In one of our projects, the version string 1.1.44. was mistakenly entered in multiple places across several issues. We would like to replace every occurrence of 1.1.44. with 1.2.50. in the following fields:

  • Issue title (summary)
  • Issue description (body)
  • Labels
  • Comments

Is there a way to perform a bulk search and replace across these fields, either via the UI or using a script/API? Any guidance or best practices would be appreciated.

Thanks in advance for your help!

3 answers

0 votes
David Nickell
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.
March 21, 2025
  1.  I think labels is the "low hanging fruit" as they say --  You should be able to click on the label "1.1.44" (any any issue) to get all those issues in a navigator.   Then add the new 1.2.50 label using bulk update.  But before you go too fast .....
  2. If all the issues that are a problem have that  1.1.44 label on them --- they provide the easiest way to grab the universe of tickets.  be sure to keep the labels in place until you've cleaned up the other fields. 
  3. next you will need to decide if you are talking about enough issues to warrant setting up something automated.  You could spend several hours perfecting your approach. If it is just a handful of issues -- bite the bullet and make the updates manually.
  4. Assuming its more than you want to edit by hand, you may find some help in automation.  I'd look there first and see what text manipulation is available.  It may not be useful for comments
  5. Since you asked about the API method -  I'll address my thoughts there.
  6. Start by getting the impacted issues in navigator, either by the label alone or by the method Mohammed suggested, set up and save a filter to grab those issues.
  7. Your API Code will need to do a couple of things:
    1. If you're comfortable with API pagination -- you will want to loop through your result set with a /rest/api/3/search?jql=filter=99999.
    2. If you're not comfortable, you'll just need to run your routines "X" times (depending on the max results your admin set up).  This assumes your fix will remove the issues from the filter so the list dwindles.
    3. Then, with whatever language you like, loop through your issues GETting each one separately (/rest/api/3/issue/{issueIdOrKey}).  Make the string changes in the Summary and Description.  Then update (PUT /rest/api/3/issue/{issueIdOrKey})
    4. Update the comments.  I would do them in a separate pass immediately after updating an issue.  (GET with /rest/api/3/issue/{issueIdOrKey}/comment --- and   PUT with /rest/api/3/issue/{issueIdOrKey}/comment/{id})
    5. Then remove the Label using the Bulk Update

 

Last thoughts -- if this is your first attempt at REST Work -- you will also need an API key.

My professional advice -- this automation may take time especially if you are new at it. There is always a chance you may make matters worse.  If it's only a few hours of manual fix time -- buy the team a pizza lunch and just crank out the updates.

 

:-) 

0 votes
Vishal Biyani
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.
March 21, 2025

@Chayoung Kim 

Another option is to use JIRA automation if the population where these updates need to be done is less.

You can use a scheduled trigger and run the JQL as suggested by @Mohamed Benziane 

Save the individual values in variables and then use edit with json like below

{
"fields": {
"summary": "{{varSummary.replace("1.1.44", "1.2.50")}}",
"description": "{{varDescription.replace("1.1.44", "1.2.50")}}"

}
}

 

Comments and labels are arrays. Those need to be looped through to make the updates.

See which approach you would like to explore further API vs Automation or a 3rd party app like script runner

0 votes
Mohamed Benziane
Community Champion
March 21, 2025

Hi,

You can try using the rest api.

Search : The Jira Cloud platform REST API
Get comment : The Jira Cloud platform REST API
Update comment : The Jira Cloud platform REST API

Edit issue (for labels, description, summary): The Jira Cloud platform REST API

You can try to search issue like this :

summary ~ "1.1.44" or labels in (1.1.44) or description ~ 1.1.44 or comment ~ 1.1.44

 

Suggest an answer

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

Atlassian Community Events