Postfunction script to lookup lower_user_name and set assignee to that user_key

I have a bit of a weird one. We have users synced through LDAP and when someone's name changes, the JIRA usernames change in cwd_user, but the user_key in app_user does not.


I have a field pulling from an external db to get a manager's username (call the field manager username) and based on the data in that field I would want to go into app_user and lookup where "Manager Username" field equals lower_user_name and then take the user_key in that row and set it as the assignee. How can I do this?

1 answer

0 vote

Hi Cole,

I think I generally understand your need, except for the "lower_user_name" part. What do you mean by that? Do you mean that the "manager username" field contains a lowercase username, and that the Jira usernames (from LDAP) are mixed case?


I was just trying to find a way to connect cwd_user to app_user. Both have lower_user_name which is the same value as user_name in cwd_user, but all lowercase. If there is a better way I am all for it.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

85 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you