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?

David

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Tuesday in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

131 views 0 4
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