Cannot delete a user because a comment is associated

Evelin
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.
February 26, 2015

Hi,

I tried to delete a user but got an error message:

Cannot delete user. 'user ' has associations in JIRA that cannot be removed automatically.

Change the following and try again:

  • Issue Comments: 1


Does anybody know how I can find this association? When I search for comments that contain that user name, I get too many.

Of course I can deactivate the usser but still I'm interested in a solution for the problem mentioned in the error message.

4 answers

1 accepted

4 votes
Answer accepted
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2015

Do not delete users. Inactivate them. Deleting them can cause errors when JIRA tries to resolve any action they took in an issue. It stores the database id, not their name in issues. Inactivating them releases the license. I assign all inactive users to a group named inactive for easy reference.

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2015

Enforcing this is actually a fairly recent change in JIRA. That is, it used to let you do this., but this causes a lot of problems! What happens when you look at the issue later? Should the comment be visible still, or should it be deleted with the user? If you delete the comment too, then this alters what happened to the issue, and other people that still exist might have responded to that comment. If the comment disappears, that would be really confusing. Where is the comment that all these people are responding to? So if the comment stays there, then what do we display for it? If the user is fully deleted, then do we say the comment was displayed by "Anonymous"? But that's a lie... So if we can't do that, then what do we display instead? It goes on and on and on. Over the years, what we have learned the hard way and the overall direction we have taken is that deleting a user means you created them by accident and they were never real and never did anything meaningful. Everything else just plain gets too complicated to be worth messing with. We do try to make sense of it, but it is a hard problem, and I am never surprised when we (or a plugin vendor) makes a mistake when it comes to deleted users. So +1000 to Joe here. If we are talking about a legitimate user who is simply no longer with the company or something along those lines, then deactivate them instead of deleting them. It keeps history intact and it is clear what has happened and everything just plain makes sense. If we are talking about a user you created by accident who hasn't done anything yet, then by all means delete them.

crf
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2015

Besides, unless the user has actually met their mortal demise, they might actually return to the company. It is easy to undo the act of deactivating them, but ^Z and ⌘Z do not work when you have outright deleted a user.

Evelin
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.
February 27, 2015

Well, it's kind of list user. We introduced it to feed the mail box of a team with notifications instead of notifying the users one by one, and the team has been disbanded. So, it's a special situation. If the users are "real people", I fully support your claim.

0 votes
sanjib dalal June 28, 2021

Unassigned all assigned tasks from particular user then try to delete. also you can do inactive user from user profile to avoid delete user.

0 votes
philleicht
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.
February 26, 2015

Hey Evelin, 

I agree with Joe. However,  if you still want to do it, I would try the following rather pragmantic approaches:

 

1) open the users Profile and browse through his activity Stream. 

 

2) use the dashboard activity stream and try the filter mechanics to rule out as much irrelevant info to ease the search for the particular comment 

 

3) if possible and within your comfort zone, you could look it up in the Database directly. 

 

4) it could be that there is an issue function for this within Scriptrunner. 

 

 

Unfortunately I'm currently travelling, otherwise I would have gladly presented you with more details and documentation. 

 

 

I hope it helps you nevertheless. 

 

 

Regards, 

 

Philipp 

 

Evelin
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.
February 26, 2015

Thanks, Philipp. I tried to find the comment that caused the error message but there are too many and I think further research would take too long because I cannot access the database and we have no Scriptrunner. I have deactivated the user.

0 votes
Prasad February 26, 2015

Select any projects under "Projects" tab, go to overview>>Issues>>All Issues. In the Search screen. Use the basic filter to select the issue by the "assignee" name, keeping all other filters as "All" to see the issue associated to the assignee.

Evelin
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.
February 26, 2015

Thanks for your reply. The problem is different, there is no issue assigned to the user.

Prasad February 26, 2015

try command line search in the "Advanced search" using the syntax: comment ~"xxxxxx*". x is basically the string used in the comment

Suggest an answer

Log in or Sign up to answer