Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Scriptrunner: Bulk Update Timezone Preferences for all Members of a Group

Guru Darbar Khalsa March 20, 2018

Using Scriptrunner, I'm trying to bulk update the Timezone preferences for members in a group.

This works for individual users but, I can't seem to figure out how to apply it to all the members in a group.

Any help would be greatly appreciated.

import com.atlassian.jira.component.ComponentAccessor

def userManager = ComponentAccessor.getUserManager()
def preferencesManager = ComponentAccessor.getUserPreferencesManager()

userManager.getUserByName('username').each { user ->
preferencesManager.getExtendedPreferences(user).setString(PreferenceKeys.USER_TIMEZONE, 'America/Chicago')


0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events