We're experiencing some issues with one of our users. We use AD-sync and I've seen questions like this but those seem to have a problem with all AD users and in our case this is just the 1 user.
Nothing differs between this one and another (working) user and a Test remote directory connection shows no errors and says Succeeded on all 7 tests, never the less the user is not able to login to our JIRA Servicedesk portal. Also; the user is listed in User Management - Users.
Any tips are greatly appreciated!
It's possible to fix it by updating user via ScriptRunner:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.ApplicationUserBuilderImpl
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.util.UserManagerdef userManager = ComponentAccessor.getUserManager()
def userUtil = ComponentAccessor.getUserUtil()//userkey of the problematic user. It can be found on database
ApplicationUser user = userManager.getUserByKey("JIRAUSERXXXXX")//builder to update the user
def builder = new ApplicationUserBuilderImpl(user)//new username
builder.name("newusername")//update user
userManager.updateUser(builder.build())
Jira uses "Username" field to update user on User Management page. That's why it throws NullPointerException. They should use UserKey.
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.
I want to try it, but where do i have to execute the script? in wich options of script runner?
Does it work in Jira Software Server ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ScriptRunner has a console that you can use to execute scripts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have this issue currently on one id that was set-up incorrectly.
I tried to run the script you gave, but I'm getting the null pointer error when I try even that...
java.lang.NullPointerException at com.atlassian.jira.bc.user.ApplicationUserBuilderImpl.<init>(ApplicationUserBuilderImpl.java:21) at Script324.run(Script324.groovy:13)
I am not good at running or debugging scripts, so if anyone could help me out - that would be very much appreciated.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you get the user_key from "app_user" table? You need to replace "JIRAUSERXXXXX" with the user_key of the user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found the app_user table, but I'm not finding an entry with JIRAUSER for this person. Did you search using the lower_user_name from the cwd_user table?
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even though I've solved it for us in another way, I'd still like to help others that may experience the same issue. I'd like to know if I should mark this as an answer, please let me know if this is a solution that works for you all so I can press "accept answer" on this, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Filiph Petzäll , @Antonio Francis ,
did you manage to find the root cause of this problem? Or a solution?
I experience the same problem with one user.
On the database level the record in cwd_user looks good: values of First Name, Last Name etc are filled, but under User Management the user look like:
Kind Regards,
Andrey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Andrey Kravtsov
Unfortunately no, I did not manage to find the cause of the issue, however I did get it to work by deleting the user (in AD) and create it anew.
Sorry if this is not helpful to you. We needed a fix quite fast and this did the trick so thats what we went with.
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.
@Filip Škledar, this problem was on our server floating. After my initial post here I met only one another user with the same problem. Meanwhile both those users and generally any other user on the server looks ok. We did not perform any Jira updates over this time. It is really strange what has happened.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Andrey Kravtsov I have the problem on server too. Thanks for fast replying I hope i will find solution.
Kr,
Filip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @[deleted]
Did you find any solution to your issue? I am having the exact same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Filiph,
I am having a similar issue with two users. I have created an account in Jira (Cloud) for them and when I go to assign test cases to them their name does not appear. I went to check in their profiles and it says they don't exist although their account is created. It seems like an AD issue to me and not a Jira issue because the other 100 odd users I have created are fine.
Is this issue similar to yours?
See my attachment.
Regards,
Tony.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Antonio, and thank you for engaging!
Yes and no. I cannot assign the user as reporter in cases and such, those things are the same as in your issue. since we use AD-sync we do not create accounts in JIRA manually so I did not create the user. The account is however created, and looks like this in JIRA:
If i click the user, I land on this page;
I do not know if the problem is in AD or in JIRA, but I lean towards that this is JIRA-related since I copied the exact same user in AD and that user worked to log into the portal. So to clarify, an identical AD account works, but not the original user...
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.