-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
15
-
At the moment, the migration assistant shows inactive users as they are having the "same" email address. But in reality, they do not have an email address.
Migration assistant should automatically handle inactive users without email addresses from an Active directory
Workaround(Approach1)
Just a disclaimer, Always back up your data before performing any modifications to the database. Please test any alter, insert, update, or delete SQL commands on a staging server first and then proceed to production
- Take a database backup (preferably using native tools by involving your DBA)
- Note down the Active directory name
select * from cwd_directory;- Fetch the inactive users without an email address from the database
select * from cwd_user where directory_id in (select id from cwd_directory where directory_name = '________') -- Add the directory_name from above SQL output and active = 0 ;- Verify if the above SQL returns the correct number of rows and the below the columns are empty
lower_email_address email_address- Run the update for a single user for testing purpose
update cwd_user set lower_email_address = 'dummy@dummy.com', email_address = 'dummy@dummy.com' where directory_id in (select id from cwd_directory where directory_name = '________') -- Add the directory_name from above SQL output and active = 0 and lower_user_name = '________'; -- Pick any sample inactive user from above SQL output- If the update works as expected for one row, formulate this SQL with a unique email address for all users and execute it (below is an example)
-- Update another user's email address to dummy1@dummy.com update cwd_user set lower_email_address = 'dummy1@dummy.com', email_address = 'dummy1@dummy.com' where directory_id in (select id from cwd_directory where directory_name = '________') -- Add the directory_name from above SQL output and active = 0 and lower_user_name = '________'; -- Pick any sample inactive user from above SQL output -- Update another user's email address to dummy2@dummy.com update cwd_user set lower_email_address = 'dummy2@dummy.com', email_address = 'dummy2@dummy.com' where directory_id in (select id from cwd_directory where directory_name = '________') -- Add the directory_name from above SQL output and active = 0 and lower_user_name = '________'; -- Pick any sample inactive user from above SQL output
- Restart Jira to see the database changes in the Jira UI
Additional info
Please use this in your staging environment, for your reference only to generate bulk update statements if there are many users (modify the count per need)
count=60 for((i=1;i<=count;i++)) do echo $ 'update cwd_user set lower_email_address = '"'"'dummy'$i'@dummy.com'"'"', email_address = '"'"'dummy'$i'@dummy.com'"'"' where directory_id!=1 and active = 0 and email_address = '"'"' '"'"';' done
Workaround(Approach2)
To temporarily install Crowd and sync these inactive users:
- LDAP user is in inactive status with a blank email address
- Connect the Crowd Server to Jira
- Create an inactive user in Crowd (ensure to have the exact similar username, in this e.g. it is ABC)
- Add the required groups in Crowd
- Perform a synchronization in Jira against the Crowd server
- Switch the user directories to the top order
- This user now belongs to Crowd (with a dummy email address)
Please cross-verify if the user history is retained across after switching directories