Bulk replacement of URL’s in custom fields

Hi,

I’m moving jira and confluence to new domain.

In content of some tickets we had static URL which were using our old domain. Therefore I done some link replacement directly in database in all places accept "Custom Fields".

I found that those links are in table name customfieldvalue in column “stringvalue”, but there are in form of "shortcut".

i.e. when I put URL https://old.domain/confluence/x/MgKJAgin browser

It will be resolved to https://old.domain/confluence/display/KDG2013/very-long-name

So I can’ just replace in DB
https://old.domain/confluence/x/MgKJAgwith
https://NEW.domain/confluence/x/MgKJAg

Because it won’t work.

Can someone tell me how is this link (shortcut) generated, and how can I replace it for all the tickets which has set up fields with URL’s ?

best regards

Karolina

1 answer

0 vote
Yew Teck En Atlassian Team Jun 23, 2014

Database system usually has a REPLACE function that you can used to replace partial text in the column vaues. Here's an example of mysql: http://stackoverflow.com/questions/10177208/update-a-column-value-replacing-part-of-a-string

Otherwise, you can export the xml and replace the old domain name with replace function in Text Editor.

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
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

134 views 0 3
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