Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eailfly/3904078a81b46f46a407d37c462fe2f3 to your computer and use it in GitHub Desktop.
Save eailfly/3904078a81b46f46a407d37c462fe2f3 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
.setString('jira.user.timezone', 'America/Los_Angeles');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment