Skip to content

Instantly share code, notes, and snippets.

@ricardocasares
Last active November 21, 2018 20:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ricardocasares/c4c0e4dea3a5ad4c3480 to your computer and use it in GitHub Desktop.
Save ricardocasares/c4c0e4dea3a5ad4c3480 to your computer and use it in GitHub Desktop.
Bulk profile update for JIRA users from Groovy script on script-runner plugin.
/**
* This script was succesfuly tested on JIRA 6.1
*/
// import JIRA Component Accessor
import com.atlassian.jira.component.ComponentAccessor
// Create a new instance
cA = new ComponentAccessor();
// Get all application users
users = cA.getUserManager().getAllApplicationUsers();
// Loop on every user
for(user in users){
// Get the UserPreferencesManager
cA.getUserPreferencesManager()
// Get user ExtendedPreferences
.getExtendedPreferences(user)
// Set notify own changes to true
.setBoolean('user.notify.own.changes', true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment