#jiraWe would like to switch dozens of existing users to another language (from german to english). Is there an admin functionality for this?
I don't believe there is an option for this, but it probably could be done either via java/groovy (if you have ScriptRunner or another plugin allowing execution of groovy scripts). The user's locale should can be found in preferences:
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.user.ApplicationUserimport com.atlassian.jira.user.preferences.ExtendedPreferencesimport com.atlassian.jira.user.preferences.UserPreferencesManagerimport com.atlassian.jira.user.util.UserManagerUserManager userManager = ComponentAccessor.getUserManager()ApplicationUser applicationUser = userManager.getUserByName("myusername")UserPreferencesManager userPreferencesManager = ComponentAccessor.getComponent(UserPreferencesManager)ExtendedPreferences extendedPreferences = userPreferencesManager.getExtendedPreferences(applicationUser)extendedPreferences.getText("jira.user.locale")// => en_UK for me
Alternatively from the DB such as found here: https://community.atlassian.com/t5/Jira-questions/How-to-find-User-s-Language-in-Jira/qaq-p/1101468
select u.user_key, PROPERTY_KEY, propertyvalue from propertyentry pe join app_user u on u.id = pe.entity_IDjoin propertystring ps on ps.id = pe.id and property_Key = 'jira.user.locale';
Might need to tweak the query a little to get your users, etc., but it's a start at least.
As usual, tinkering with any of these is not supported and you can brick your instance if you update the values wrongly or mistakenly update something in a bad way. I never recommend to do anything with the database, if you are not fully aware of the impact. A full testing on a separate staging instance is always a must.
If you're not confident and comfortable doing full testing if everything does work afterward (I don't know if you can just switch it and restart Jira or if something else could be missing), the best way would be to just let the users switch the language on their own, nothing can really go wrong with that and you're not risking breaking anything.
We've never really done such a bulk update for the users, I imagine it's not a very common use case, but perhaps someone can give you a better idea. These are just my first thoughts how I'd tackle it, but I'd really push towards getting the users switch their preferences themselves rather than tinkering with the backend.
It looks like you're new here. Sign in or register to get started.