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

This widget could not be displayed.

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
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

511 views 3 18
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