Our Jira is integrated with our Active Directory. When our IT dept creates a new user in the Active Directory, the username (email) will be available in Jira.
When an Active Directory name is first created, Jira will make a record of it (lets call it username-contractor). My post functions works when I make issue assignments using one of these 2 functions:
issue.assigneeId = 'username-contractor'
Or issue.setAssigneeId("username-contractor")
But let's say the IT dept changes the user name at a later date to "username".
I can still use the functions as before and it works:
issue.assigneeId = 'username-contractor'
Or issue.setAssigneeId("username-contractor")
When in the ticket I hover over the assignee, I can see their new username and not the old username-contractor
Then I try to update my script and use the new username like below:
issue.assigneeId = 'username'
Or issue.setAssigneeId("username")
But when I do that It appears that I cannot use the same functions with the new username. As a result the ticket will not get assigned to the user.
So my question is, it is clear to me that Jira keeps 2 records of the user. What function can I use to set the assignee to the new username?
Appreciate any feedback.