Hello. We need to remove now-inactive users in JIRA 7.10 from certain groups, e.g. jira-users, to effectively remove licenses. We can then re-enable the accounts so they may request fresh access as needed via JIRA Service Desk, which runs atop JIRA.
I have this code that seems to ID the accounts:
SELECT DISTINCT u.user_name, u.lower_email_address
FROM cwd_user u
JOIN cwd_membership m
ON u.id = m.child_id
AND u.directory_id = m.directory_id
WHERE m.lower_parent_name in ('jira-core-users', 'jira-users', 'jira-users-all','jira-servicedesk-users','confluence-users')
AND u.directory_id = 3
AND u.active = '0'
ORDER BY user_name;
The trick, assuming this correctly IDs who (a) is inactive and (b) is in of one or more of these groups, is how to bulk-remove them from those groups but not delete them. Once that is done I can easily flip em all back with a bit of SQL we know.
Nic, I know this isn't ideal, to hack the SQL, and that we have to restart to make it effective. I am working this on a test server first to make sure.