Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

User's name in assignee field shows as plain text instead of JIRA name link

Jonathan Smith Community Leader Jun 17, 2020

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:

  1. Workflow post function [create --- to do]
  2. Add post funciton
  3. Scriptrunner - Script Post Function
  4. Create sub task
  5. Condition:

    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

  6. issue.assigneeId = "Katie.Txxxxxxx"

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.

katie.jpg

1 answer

1 accepted

0 votes
Answer accepted

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 :)

Jonathan Smith Community Leader Jun 18, 2020

@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?

@Jonathan Smith I mean...you have user with attributes

  • userkey = xx
  • username = yy

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)

Jonathan Smith Community Leader Jun 19, 2020

@Martin Bayer _MoroSystems_ s_r_o__  

  • Verified that the user key and lower_user_name were different in the database. 

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.

a.jpg

hi @Jonathan Smith could you give it a try and use

issue.assigneeId = "kwxxxxxxx"

and let me know if it helped... 

Jonathan Smith Community Leader Jun 24, 2020

@Martin Bayer _MoroSystems_ s_r_o__ 

Using kwxxxxxxxxxx worked...  Going to have to remember to use maiden names in these scripts.

Thank you!

Jonathan

@Jonathan Smith great, happy to hear I helped you :), yeah these identifiers are quite tricky in Atlassian tools (sometimes :))

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

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...

200 views 6 7
Read article

Community Events

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

Events near you