How do I search and replace a URL in a custom field?

I have a custom field that has a URL to a web site that is different for most JIRA tickets, but the domain is always the same. the domain has changed so now I need to modify the URL so that it points to the new domain. The rest of the URL remains the same. I would like to bulk edit and replace the domain in this custom field. How do I do that. 



2 answers

Your option is very limited here since you are in the cloud. I can't think of any other way than to do a Bulk Update ( 

How many issues do you need to move? You can code something to make the change via the REST API.

I looked through that documentation. What I have is a url like this: "https://<domain1>/testrail/id123456"; and I need to change it to "https://<domain2>/testrail/id123456"; I did not see anyway to change just a portion of the URL can you point me to this if there is something available? Or if not then Perhaps I can code to the REST API if you get me that documentation. thanks, Rich.

You can use the JIRA Command Line Interface (CLI), but you will need a bit of scripting as it doesn't support a find/replace update at this time. You will need to:

  1. use getFieldValue to retrieve the current value of the custom field
  2. use script to modify the value to replace the domain name
  3. use setFieldValue to update the value of the custom field
  4. use getIssueList so you can iterate over each of the issue that need to be updated


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

998 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you