Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to mass delete projects from Jira ?

Anonymouslemming March 12, 2015

We're splitting a JIRA instance into two by cloning it, and we need to delete around 50% of the projects (600) from the new instance. 

I don't see anything in the REST API that allows us to do this, and we're unable to use the CLI because we use a custom authentication solution.

Is there any automated solution for project (and associated issue) deletion either via database manipulation, SOAP, etc. ? 

We're on JIRA 5.2.11

Thanks in advance

6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
david
Solutions Partner
Solution Partners provide consulting, sales, and technical services on Atlassian products.
August 31, 2018

Hi everyone, Profields in its recent release allows performing bulk delete projects including their "orphan" schemes. Also allows to bulk change roles, components, project lead, and category.

Cheers,

David

bulkops.jpeg

2 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
March 12, 2015

JIRA Command Line Interface (CLI) and the deleteProject action. Use together with one of the run action like runFromList.

Anonymouslemming March 12, 2015

Bob, Unfortunately we're unable to use the CLI because we use a custom authentication solution and we cannot pass a username / password to tools like this.

sravan321990 September 6, 2016

Hi @bob swift,

We are currently having a similar requirement can you please let us know how to move forward after generating the list in csv.

Here is what we have done so far 

-a run --common "--outputFormat 999 --dateFormat yyyy-MM-dd" -s https://bobswift.atlassian.net -u automation -p ${bamboo.bobswiftPassword}
 
@DATA: -a getProjectList --file projectList.csv


### Delete List of projects.
-a runFromList --list ACLI,BCLI,CSOAP,CRUCLI,FCLI,SCLI --common "-a deleteproject"

We are skeptical about the last command.

Bob Swift OSS (Bob Swift Atlassian Apps)
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.
September 6, 2016

It is a more simple than that. Should just be:

-a runFromList --list XXX,YYY --common "-a deleteProject --project @entry@"

Similarly you can use runFromProjectList with a regex expression to find the right project keys. Be careful though, so only the right projects are in the list.

George Bica December 5, 2016

I wrote my answer to this question using Bob's addons here: https://answers.atlassian.com/questions/44597928

1 vote
Maren
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 18, 2019

Hi there,

Maren here from Atlassian. It is possible to delete all projects at once from Jira Cloud by "resetting" your cloud site, which removes all data from your site and returns settings to their default states. This will affect site data but not user management. 

Note that this works if you want to delete ALL your projects, but not in the case of the original question (deleting half the projects). 

I hope this helps, and please let us know if you have any further questions.

Best wishes,

Maren

1 vote
Norman Abramovitz
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.
March 14, 2015

There is a SOAP interface that was deprecated in 6.X but it still exists.   Look for deleteProject link.

https://docs.atlassian.com/software/jira/docs/api/rpc-jira-plugin/latest/index.html?com/atlassian/jira/rpc/soap/JiraSoapService.html

https://developer.atlassian.com/jiradev/api-reference/jira-api-status/jira-rpc-services/creating-a-jira-soap-client

I am not sure about your special authorization needs though since your gives no details.

 

0 votes
Victor Pana August 17, 2018

I've used the following steps in my case: 

Ran the following SQL in the database

select project_key from project_key

Exported the results to a csv file.

Rename the header of column from project-key to project

Run the following commands for JIRA CLI 

./jira.sh --action runFromCsv --common "--action deleteProject" --file projectkeys.csv --continue -v

0 votes
Norman Abramovitz
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.
March 12, 2015

Bulk delete of projects does not exist.   Here is the JIRA outstanding issue for this feature.

https://jira.atlassian.com/browse/JRA-31028

One way, if the time is worth the effort, is to use a web page testing tool like Selenium to automate the project deletion.  If your QA people use automated web page testing tools, they could probably build the tool for you quickly.

 

Anonymouslemming March 12, 2015

That's quite a sad state of affairs :( Using anything that relies on the Web UI is something I would prefer to avoid for a number of reasons. Firstly, the UI changes quite signifanctly from version to version, so this would not be usable once we complete our Jira 6 upgrade. More importantly though, the dynamic nature of the UI makes this hard to reliably automate, and the paging system implemented in newer Atlassian products makes this harder.

Norman Abramovitz
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.
March 12, 2015

Your description for splitting projects does not imply like it needs to be a long term solution (ie once you clone and delete you are done). Yes, you might need to this a few times, but the UI will not be changing. With the correct tool, this approach is quite reliable.

Anonymouslemming March 12, 2015

Sadly, it does need to be a long term solution. We'll be doing a lot of this over the next few months to improve performance of our plant. And that will take place on both Jira 5 and Jira 6 instances.

George Bica December 5, 2016

I wrote my answer to this question using Bob's addons here: https://answers.atlassian.com/questions/44597928

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events