-
-
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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