Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Postfunction script to lookup lower_user_name and set assignee to that user_key

Cole
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2017

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 votes
David Fischer
Community Champion
September 19, 2017

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

Cole
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2017

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
TAGS
AUG Leaders

Atlassian Community Events