Hi,
I have to migrate tasks from another system to Jira, approximately 17000. When testing the migration, it's really painful to clean up, as bulk operations are limited to 1000 at a time. I had that raised to 10000, but bulk operations failed for such an amount. We lowered it to 5000, and lived with that for a while, but then Jira started to fail for 4000, than for 3000, then for 2000 at a time...
I'd need a solution that
a.) Quickly deletes all issues from a Jira project (I don't mind if issue numbering is reset or is continued).
b.) Have the bulk operation run for as many issues as possible at a time. (this is the less preferred solution as it is really slow, but I can live with that)
I'd rather not delete the project itself, as it has a bunch of configuration applied to it (workflow, screen, issue schemes, etc.).
Any ideas?
Use JIRA Command Line Interface (CLI) and something like:
--action runFromIssueList --jql "project = XXX order by key desc" --common "--action deleteIssue --issue @issue@"
I tried
jira --action runFromIssueList --jql "project = ProjName order by key desc" --common "--action deleteIssue --issue @issue@"
but received this:
Error: Parameter 'action' cannot be declared more than once.
Error: Parameter 'jql' cannot be declared more than once.
Error: Parameter 'common' cannot be declared more than once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also found examples here: https://bobswift.atlassian.net/wiki/display/JCLI/Examples
so I tried
jira --action runFromIssueList --common "--action deleteIssue --issue @issue@" --search 'project = "ProjName"'
that resulted in
Error: Unexpected argument: =
Error: Unexpected argument: ProjName'
Error: Parameter 'action' cannot be declared more than once.
Error: Parameter 'common' cannot be declared more than once.
Error: Parameter 'search' cannot be declared more than once.
Error: Unexpected argument: =
Error: Unexpected argument: ProjName'
So it seems to me that the examples simply don't work...
My java version is
C:\Jira>java -version
java version "1.8.0_101"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The examples do work. Is that the exact action string you are using with ProjName? I suspect not. Make sure you have not double quoted it. Embedded double quotes need to be escaped. I recommend using project key so quotes are not needed in your JQL. And for other cases, always use single quotes in your JQL so you don't have to worry about escaping double quotes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry for the delayed answer, the system prevented me from posting too many comments...
The issue was that I incorrectly customized the jira.bat file, putting %* twice in the command line.
The script (and the examples ) work fine now.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Balint,
If you delete the project then its configurations will not be deleted. To be on safer side keep a copy of it's configurations.
Otherwise you can use JIRA Rest API to delete the issues in bulk. What I do is use a label like "bulk-26Aug16", in case bulk import fails I can quickly find these issues wither by JQL and then delete it either through the UI or REST API.
-Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Delete rather than import, I think you meant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how do you do bulk delete with REST API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, any script is OK. The one I got to use is Bob Swift CLI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
when you say "babysit the deletion process" - does writing a script that uses the REST API meet this requirement?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having seen the comments I have to add what I meant by efficiency was that I don't have to babysit the deletion process. I don't mind if it runs slow, as long as it runs without user interaction.
JIRA Command Line Interface, although I have not yet decided whether to buy it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could script it, but it's not going to be faster than bulk-delete.
The easiest way really is "delete project", as that will just churn through all the issues, there's no limit on the number in the project. If you do delete a project, then there's some points to remember:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good points!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tend to go with a jira-python script to search for the issues and then delete them one by one. Not very fast, but you can restart it and it doesn't timeout
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.