I am trying to bulk edit user properties using groovy scripting. The user's I'm editing share the same group, call it "Testing". This is what I have so far:
import com.atlassian.jira.component.ComponentAccessor
def userPropertyManager = ComponentAccessor.getUserPropertyManager()
def userManager = ComponentAccessor.getUserManager()
def groupManager = ComponentAccessor.getGroupManager()
def users = groupManager.getUsersInGroup("Testing")
for (user in users) {
userPropertyManager.getPropertySets(user).setString("jira.meta.myproperty","123")
}
Something is missing here but I'm not seeing it.
Solved:
userPropertyManager.getPropertySets(user)
Should have been
userPropertyManager.getPropertySet(user)
No "s" in Set..
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.