Bulk email address change for JIRA 5.1.2

We have tried using the following script to update (in bulk) the domain names of our email addresses, but it's not working. Anyone know what is wrong with our script? We are running JIRA 5.1.2 and out database is Oracle 11g.

UPDATE CWD_USER
SET email_address = user_name || '@noemail.com',
lower_email_address = lower(user_name) || '@noemail.com',
updated_date = sysdate
WHERE email_address not like '%@currentdomainname.com'

3 answers

1 accepted

It is a dumb method, but worked for me.

Have you tried to dump everything to xml backup file, and then using email regex like this:

="^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$"

or simple: ="(.*?)@(.*).[a-zA-Z]{2,4}"

We were getting ready to try editing the xml backup file (find/replace all) but my co-worker said you're method was even better. We'll try it out tomorrow. Thanks - we'll let you know if it worked.

In the test environment (Jira v5.2.10 + Oracle 11.2.0.3.0) we :

1. stopped Jira
2. did an direct SQL Update:
update cwd_user
set email_address = substr(email_address, 1, instr(email_address, '@')) || 'newmaildomain.xxx'
,lower_email_address = substr(lower_email_address, 1, instr(email_address, '@')) || 'newmaildomain.xxx'
where email_address like '%@oldmaildomain.xxx';
3. started Jira

The email address is correctly shown, even in the opened issues.

Question:

What was not working in your case?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,849 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot