Delete all Projects Issues?

Samir Freelance
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.
August 14, 2011

How can i delete all issues in all the projects

to have clean Projects empty from issues?

Regards,

Samir

6 answers

1 accepted

2 votes
Answer accepted
Markus Lepper
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.
August 15, 2011

Hi Samir,

just a hint: After deleting all project issues the next created issue will -of course- NOT start at xxx-1, but the next free number before deletion.

To reset the issue counter you need to change the SQL-field "project > pcounter" to 0.

BR, Markus

Samir Freelance
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.
August 15, 2011

thanks for the hint , I didn t yet perform a bulk delete

do you have another way to delete all issues without deleting projects?

Markus Lepper
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.
August 15, 2011

Hi samir,

why should I need another option than 'Bulk Delete'? It is THE means to delete x issues at the same time.

=> Try it...it just works ;-)

BR, Markus

Samir Freelance
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.
August 16, 2011

Markus i checked the link http://confluence.atlassian.com/display/JIRA043/Modifying+Multiple+%28%27Bulk%27%29+Issues

the document is not clear for Bulk delete

I clicked on the filter navigatore but there is no bulk delete ?!

please do correct me if i am wrong..

can you please tell me step by step and i will follow your guide to delete all issues from all projects i will be thankfull !

Markus Lepper
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.
August 16, 2011

Hi Samir,

in any Navigator View there is on the top right side a cogwheel icon with text "Tools".

Click it and you'll find as first option "Bulk Change:"

BR, Markus

Samir Freelance
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.
August 16, 2011

Markus in tools i can only see "configure columns"

in issue navigator I searched all projects there are on right side Views and Tools

i clicked the smart tag on tools it only shows " configure columns" there is no"Bulk Change"

Like Aizhan Rayeva likes this
Markus Lepper
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.
August 16, 2011

Hi Samir,

Please check if you have the right to bulk change issues:

See "Administration > Global Permissions > Bulk Change"

BR, Markus

7 votes
dgc
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!
February 19, 2019

Are there any new answers to this? I understand that deleting directly from the database is not desirable, but I have 32,000 issues to delete and Jira's bulk change will only delete 1,000 at a time, at an interactivity cost of about 2 minutes per 1,000. That's well over an hour of nothing but staring at a screen, occasionally clicking mindlessly for punctuation. I'd love a more effective answer.

(Context: we have production and test jira instances, and we periodically clone prod to test. The test instance allows many people admin access who don't have admin in prod, so certain issues need to be removed after cloning to protect privacy.)

Jurgen Schober
Contributor
March 22, 2019

I vote for this question. Are issues referenced anywhere. I am not a big fan of brute force deleting entries from a table, but if this is somewhat safe (delete + reindex + reset pcounters) this looks like a more efficient way. But what about linked issues, attachments, etc. Can we somehow set the threshold to unlimited instead of 1000 at a time?

NCATS LAB
Contributor
July 29, 2020

I have the same scenario as David. I can use the database to delete all issues as Jurgen suggests, but the database still contains all the attachments. Deleting the attachments from the filesystem only throughs null pointer errors. We need a way to delete all issues and attachments, links, etc. in a testing environment.

1 vote
Maurice Müller
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!
October 8, 2018

Straight from the docs:

1. From the Issue Navigator, perform a search with the required filters to produce an issue result set.
2. Select the Bulk Change option from the 'Tools' menu of the Issue Navigator.

This is question was the first hit of my search for this specific task. So I added this answer that you quickly find the solution (I basically followed the link of Penny Watt and read through the docs). This hopefully will save some others precious time ;)

1 vote
Eva
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.
August 16, 2011

adding to Marcus + Penny's answers, I found it easier to just delete it from the database itself (that is assuming you are using an external database like I did and not HSQL that comes with JIRA). this will starts everything in clean state and you have better control of what you are deleting.

here are the SQL I used:

Delete from jiraissue where projectid =< project id here>;

commit; (or if you have auto commit, skip this step)

Update project set pcounter = 1 where id = <project id>;

commit;

And like any other Database update, it REALLLy necessary to restart JIRA after this.

Markus Lepper
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.
August 16, 2011

Hi Eva,

you need to set pcounter=0, as Jira takes the next freee id when creating issues.

...just in case you want to have first issue xxx-1 :)

BR, Markus

Alexander Johannes
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.
August 16, 2011

Eva,

i would not advice direct manipulation of the JIRA database. There are too many things you can mess up. Also restarting JIRA after the direct deletion in the database is not sufficient. You also have to reindex the database.

Eva
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.
August 16, 2011

@Alexander - What do you mean reindex the database? What would happen if i did not reindex?

Alexander Johannes
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.
August 16, 2011

If you don't reindex after a direct manipulation of the database, you will see old, inconsistent data. See also the documentation about reindexing.

Samir Freelance
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.
August 16, 2011

thanks for sharing your experience

NCATS LAB
Contributor
July 29, 2020

Eva's suggestion still leaves all the attachments in the database. Is there a way to clean these up from the database as well?

Karsten Pawlik
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!
August 25, 2020

If you want to delete all attachments from the database you could use this sql statement:

delete from fileattachment;

and then remove the contents of your jira_attachments folder.

if you just want to delete the attachments linked to issues of a specific project there is no easy way to filter them out and delete them.

Like NCATS LAB likes this
1 vote
Penny Wyatt (On Leave to July 2021)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2011

You can perform a bulk delete - http://confluence.atlassian.com/display/JIRA043/Modifying+Multiple+('Bulk')+Issues

Alternatively, you can just delete and recreate all of the projects, if there aren't too many of them.

Penny Wyatt (On Leave to July 2021)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 14, 2011

In that case, the bulk delete option I suggested should work fine.

Samir Freelance
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.
August 14, 2011

deleting all of the projects is not a good option ) because have more than 20 projects and every project has it s screen scheme and its workflow

I am just looking to delete all issues without deleting my products or projects

Samir Freelance
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.
August 14, 2011

Okay thank I will give it a try and mark your comment as Solved asap

Samir Freelance
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.
August 16, 2011

Honestly i didn t know how i can delete issue one by one ..i wasn t able to find bulk delete

plrase provide me the steps to provide Bulk delete wiithout deleting the projects(products)

again i appreciate your help

NCATS LAB
Contributor
July 29, 2020

Penny's suggestion is well known. It is also not feasible. The bulk delete option allows only 1000 issues to delete at a time. This is a massively time consuming process even on a medium size instance. In situations where we are syncing prod to testing then deleting issues from testing, this can take a whole day just to perform a simple process.

0 votes
NCATS LAB
Contributor
March 11, 2021

Just a little update:

If you want to delete ALL issues and their attachments from Jira, this will do it (don't forget to delete the contents of <jira_home>/data/attachments/)

delete from jiraissue where project in (select id from project);
update project set pcounter = 0 where id in (select id from project);
delete from fileattachment;

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events