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

This widget could not be displayed.

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.

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

55 views 1 0
Join discussion

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