What is the best way to migrate users from Crucible to Jira?

Hi,

We have been using FishEye/Crucible for a while, and have recently added Jira. I would like to only have one list of users (which I presume will be in Jira). My question - is there a way that I can migrate those users to Jira in a way that their Crucible accounts are not affected (that is, I would prefer to not just delete them all and re-enter them in Jira, as I'm concerned their history and preferences in Crucible would be lost).

Thanks,
Mike

4 answers

1 accepted

Accepted Answer
0 votes

Hi Mike,

Use the following SQL command to get the list of users in FishEye:

SELECT cru_user_name,cru_email FROM cru_user WHERE cru_fisheye_enabled = (1);

Create Jelly script to add the users into JIRA

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.JiraTagLib">
<jira:CreateUser username="new-user" password="password" confirm="password"
fullname="Full name" email="test@test.com"/>
</JiraJelly>

After adding all the users into JIRA, integrate JIRA into FishEye for user management at Administration > Security Settings > Authentication. Do not enable synchonization or synchronize the user as this will create duplicate users in FishEye (One using FishEye authentication, one using JIRA authentication).

Stop Fisheye and run the following script to change all the current users in FishEye to use JIRA for authentication:

UPDATE cru_user SET cru_authtype = 6;

Restart FishEye and confirm all the users in FishEye is working correctly before enabling JIRA user synchonization in FishEye.

that is, I would prefer to not just delete them all and re-enter them in Jira, as I'm concerned their history and preferences in Crucible would be lost

Yes, deleting the user will lose the history and preference. Do not delete the users.

As you can see from this answer, the next step is to add JIRA into FishEye for user management and do not synchronize the users.

Hi,

Thanks for the reply. We are working on it here. I had to do cru_fisheye_enabled != 'true' to get my regular users. Doing = 'true' only gave me the two users who I had deleted earlier. Odd.

Anyhow, for what it's worth, here's the query I used to generate the CreateUser lines:

select concat('<jira:CreateUser username="', cru_user_name, '" password="password" confirm="password" fullname="', cru_displayname, '" email="', cru_email, '"/>')  from cru_user WHERE cru_fisheye_enabled != 'true' into outfile '/tmp/users4.txt';

I'll let you know how the next steps go.

Mike

Make sure that you have the same username for the users in FishEye and JIRA

That's weird. If cru_fisheye_enabled is not true then it will not be shown in FishEye. Those users should be the one that have been deleted in FishEye.

I think I figured it out. The 'enabled' fields are of the 'bit' type. So the proper where clause for active users should actually be: where cru_fisheye_enabled = (1)

To find inactive users, it would be: where cru_fisheye_enabled = (0)

In fact, these two where clauses return the same results:

where cru_fisheye_enabled = 'true'

where cru_fisheye_enabled = 'false'

Both of these evaluate the same as when using where cru_fisheye_enabled = (0)

By using the query I did, it generates a set of "CreateUser" commands using the original Crucible usernames, so that's how I'm making sure the names are the same.

Hopefully today the IT guys will run the Jelly script, I'll let you know how it goes.

Thanks!

Mike

Edited the original answer

Sorry for my mistake. It is showing in my DbVisualizer as 'true' and I forget to check its data type.

Sorry for the long delay in responding - I wanted to make sure everything was working properly. And it is!

Thanks for the solution.
Mike

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

456 views 7 5
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