Bulk change of links in jira

One of our customers has added a lot of links to Sharepoint content in his JIRA project, and that Sharepoint instance has moved and is now available under a new URL. Is there a simple way to modify all the links from a source to a target? I know that there are tools available to script something like that, but this will not be an option for him.

1 answer

1 accepted

Simple would be oversimplifying it (hah see what i did there? wink )

  • Shutdown JIRA
  • dump the database

    mysqldump --single-transaction --routines -uUsername -pPassword --max-allowed-packet=1G jira > jira.sql
  • use linux standard tools sed to replace old vs new hostnames like:
cat jira.sql | sed 's/https:\/\/oldURL\./https:\/\/newURL\./g' | sed 's/http:\/\/oldURL\./http:\/\/newURL\./g' | sed 's/https:\/\/oldURL\//https:\/\/newURL\//g' | sed 's/http:\/\/oldURL\//http:\/\/newURL\//g' > new.jira.sql

What i do here might seem odd, but it's to make sure

http://servername/

https://servername/ 

http://servername.whatever.follows

and

https://servername.whatever.follows

All get converted to their new names (short and fully qualified, http and https)

  • import the new database back

    mysql jira -uusername -ppassword < ./new.jira.sql
  • Start JIRA again.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

672 views 3 11
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