I am trying to set a Jira user to active from Jira Service Desk (SSD) via script. When I run the script in SSD it sees the user as active even if he/she is not active in Jira. When the script is run in Jira the user is set as active. Is there a way to set the user as active from SSD without running the script in Jira?
Can you post the script here? Perhaps we can help you. Where is the script run? In a transition?
I think the issue is that it checks if the user is active on Jira Service Desk and not on Jira. So I probably need a way to get the UserManager from Jira or something along that line. This sets user to active if he/she is not.
if (!userManager.getUserByKey(username).isActive())
{
userManager.updateUser(new ApplicationUserBuilderImpl(userManager.getUserByKey(username)).active(true).build());
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.