Forums

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

Delete user and get all comments by user

Vasil Gjorgjiev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 26, 2023

Hi,

I need to delete existing user. I already deleted the tasks and filters created / assigned to that user. Now I need to delete all the comments by that user in order to be able to delete the user. How I can find all the comments by username and bulk delete them or assign to some other existing user?

My Jira Software version is 8.4.1.

1 answer

0 votes
Joe Pitt
Community Champion
December 26, 2023

I don't believe you can. Comments are stored in the same database cell.  You should inactivate the user, not delete them. You have already destroyed the history of everything else they did. At some time in the future your company may want to see that history or question why issue numbers are missing. 

Vasil Gjorgjiev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 26, 2023

I know, but it was request from the management. However, I exported all the tasks for the user in PDF, but of course in JIRA is much better. It is impossible to search for the comments written by specific user in thousands of tasks.

Sunny Ape
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.
December 26, 2023

It's not impossible to find all issues with comments by a particular user, as long as you have a third party add-in like ScriptRunner. Google 'Jira JQL get issues with comment by user' for where that question has been asked and answered before.

Now that you have that list of issues, removing the comments per issue is the tedious part. You'd have to write a script to interact with the REST API to query each of those issues, one at a time, get all the comments, inspect each comment to see if it was created by that user, then change the content of that comment or delete the comment itself.

That action still does not erase the fact that the creation of a comment by that user ever happened, since that is recorded in the issue event log, as well as any event of the comment being changed or deleted.

Suggest an answer

Log in or Sign up to answer