Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Link to github sources

...

Here is Postgres-flavoured SQL, creating a queries.inactive_users view, of users that can be deactivated (source at https://github.com/redradishtech/jira-user-deactivator-groovy/blob/master/active_users.sql):

Include Code
languagesql
urlhttps://raw.githubusercontent.com/redradishtech/jira-user-deactivator-groovy/master/inactive_users.sql

Here is a corresponding Groovy script that reads usernames from the view, and deactivates those accounts (source):

Include Code
languagegroovy
urlhttps://raw.githubusercontent.com/redradishtech/jira-user-deactivator-groovy/master/deactivate-inactive-jira-users.groovy

...

I haven't researched this much further, as instances I work with all have ScriptRunner available.

What about Confluence?

There is now a Confluence version of the inactive_users  SQL at https://github.com/redradishtech/jira-user-deactivator-groovy/blob/master/inactive_users_confluence.sql. Note that the SQL doesn't limit itself to Internal directories yet. I haven't made a Groovy deactivation script based around it yet.

Conclusion

Using ScriptRunner, we have implemented a means for Jira to automatically deactivate inactive users, thus saving license slots. This is (to my knowledge, as of  ) the only implementation that handles never-logged-in users. Users who require more flexibility can use the SQL-augmented approach.

...