Our Jira instance has groovy code that assigns values to various UserPicker custom fields.
During workflow transitions, our code essentially does:
ApplicationUser appUser = userManager.getUserByName("username")
This works, but we recently ran into a case where for a particular User it didn't work.
After looking into it, it turns out that what makes this User unique is that he had his username changed through the Jira GUI at some point. For example, if he had been created with "username" and subsequently updated to "username2", the app_user table now looks like this:
jira=> select * from app_user where user_key not like lower_user_name;
id | user_key | lower_user_name
13400 | username | username2
I've verified that the appUser object is correctly retrieved from the userManager, but it seems as though setCustomFieldValue function can't find the right user to set the CF to.
I've also tried updating the CF using the updateValue method, but this seems to have the same problem.
Anyone run into this, and have a workaround?
We're on Jira 7.1.2 FWIW.
For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events