You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
In one of our JIRA projects, when a component is chosen, sub tasks are automatically created and assigned to users.
For one user however, their name in JIRA becomes plain text in the assignee field until we switch it to someone else and then back to them.
How this is scripted:
import com.atlassian.jira.bc.project.component.ProjectComponent
import com.atlassian.jira.component.ComponentAccessor
for(ProjectComponent projectComponent: issue.getComponentObjects()){
if(projectComponent.getName().equals("xxxxxxxxxxxxxx"))
return true
}
return false
For every other post function we script, their names show up properly, but this user does not. Katie's items need to be assigned to someone else, then back to her for her name to show up like all other JIRA users. She also does not get the notifications when the issue is created (how they want it).
Any ideas? I verified her name shows up properly in the system. This only happens to this one user.
hi @Jonathan Smith I remember we had a problem with this and it was "userKey" vs "userName" problem. If this user is one whose username was changed in the past, it might be the same problem.
So Katie.Txxxxxxx is maybe userKey and you need to use userName or vice versa... give it a try and let me know, pls :)
@Martin Bayer _MoroSystems_ s_r_o__ That might be the situation however in step 6 the only code is issue.assigneeId = "Katie.Txxxxxxx" .
Where are you suggesting I update userkey/username value?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jonathan Smith I mean...you have user with attributes
We dont know which of these attributes is Katie.Txxxxxx. So you have to find out username and userkey for this user.
You can do it in scriptconsole and use UserManager component and methods getUserByKey or getUserByName.
(sorry but I'm on vacation with horrible internet connectivity,so if it won't help you,I will provide you correct script on Monday)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Martin Bayer _MoroSystems_ s_r_o__
What is odd is the previous post functions work fine for the user, it is only this newly created post function.
Note: I have the scriptconsole, however I don't seem to have a selection for UserManager.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi @Jonathan Smith could you give it a try and use
issue.assigneeId = "kwxxxxxxx"
and let me know if it helped...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Martin Bayer _MoroSystems_ s_r_o__
Using kwxxxxxxxxxx worked... Going to have to remember to use maiden names in these scripts.
Thank you!
Jonathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Jonathan Smith great, happy to hear I helped you :), yeah these identifiers are quite tricky in Atlassian tools (sometimes :))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.