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).
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="email@example.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.
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.
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.
Atlassian Summit is an excellent opportunity for in-person support, training, and networking.Learn more
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG