built-in user rename script strips groups from Delegated LDAP directory users in Jira 4.3.2
*This issue has moved*
This issue has been moved permanently to Adaptavist's Product Support JIRA instance.
All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the
Can't access your account link in order to reset to a new password.
After rename user is left belonging to no groups. Log of the change:
Beginning rename of dmurphy to murphyd
Update 0 Membership records
Update 0 TrustedApplication records
Update 0 SearchRequest records
Update 0 ColumnLayout records
Update 0 UserHistoryItem records
Update 0 FavouriteAssociations records
Update 0 PortalPage records
Update 0 FilterSubscription records
Update 15 Issue records
Update 0 Action records
Update 0 ChangeGroup records
Update 7 ChangeItem records
Update 50 UserAssociation records
Update 0 ProjectRoleActor records
Update 0 Worklog records
Update 0 Project records
Update 0 Component records
Update 0 Notification records
Update 0 SchemePermissions records
Update 0 SchemeIssueSecurities records
Update 0 CustomFieldValue records
Update 0 OSHistoryStep records
Update 0 FileAttachment records
Reindex 65 issues
Update parameters for 0 search requests
Completed rename of dmurphy to murphyd
LDAP delegated directory
That's right, it will only touch stuff with a directoryId of 1, this was mainly because when released, I didn't have time to test all these various combinations. I will try to revisit this soon.
First of all thank you very much for the plugin.
We also use JIRA 4.3.4 with a "JIRA Delegated Authentication Directory" with local JIRA groups. Every user directory in JIRA has it's own ID and every group can exist in every directory. For example the group "jira_admin" exists twice
The directory id is also used in the table CWD_MEMBERSHIP
But the script don't change the PARENT_NAME and LOWER_PARENT_NAME for memberships with a DIRECTORY_ID unequal 1. Changing the PARENT_NAME and LOWER_PARENT_NAME to the correct username in the database and restarting JIRA will fix the problem for me. Hopefully you can modify the plugin to support other directory id's.
oh... looks like this may have been a false alarm... after restoring to a pre-"messing around" state the problem doesn't reproduce.
i'll update if it is encountered again.
If not, THANK YOU for an awesome function that hasn't been handled by Atlassian since 2003 !!
i am also trying to migrate from a local user management to an LDAP one.
we are using Jira 4.3.4 and i have setup an AD "user directory" of the "Read Only, with Local Groups" type.
now when i try to use the rename function, some users are successfully merged, but others get the error of: "java.lang.IllegalArgumentException: Passed List had more than one value."
the full stack trace is attached.
is there something that i missing or need to do?
thank you in advance for any assistance, Aviad.
hi Jamie, I had Jira 4.1.2 authenticating against LDAP using osuser.xml, so the users and groups were in the local DB but authenticate externally. I upgraded it to 4.3.2, which tests the LDAP dir and moves any internal users it finds there to a "JIRA Delegated Authentication Directory". These are the users whos groups get dropped when we rename them with your script.
This is delegated LDAP auth, not full sync as you might get from an AD directory, so the groups are local, not from LDAP. Looks like a copy of each is in cwd_group and mapped in cwd_group_memberships.
So yes I just added the groups back manually after the rename.