Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note that the script doesn't work properly as a service

...

  • Save the above script to $JIRAHOME/scripts/deactivate_inactive_users.groovy. Make it owned by root but readable by group jira.
  • Go to the Scriptrunner Script Console and do a test run:

  • Warning

    I am finding that users are not actually deactivated, when the script is run like this as a service. The script runs successfully judging by the logs, but users are unaffected. YMMV - I have not yet debugged this, and it may affect only my Jira 8.5.1 instance.


    If all looks good, go to Jira's Services  admin page, and add a service of type com.onresolve.jira.groovy.GroovyService 
    Image Modified

ScriptRunner Solution with SQL Rules

...