Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Qijiang60/b4cbeb4335e8850ba800b0172dc8871b to your computer and use it in GitHub Desktop.
Save Qijiang60/b4cbeb4335e8850ba800b0172dc8871b 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