Forums

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

deleteIssue using runFromCsv not working

Dawn Peeples October 9, 2018

We are trying to automate the export and then delete of all issues that are 2 years and older.  

I have found how to export issues using the getIssueList and save to a csv file.  

For example - ./jira --action getIssueList --jql "project = sdhd AND resolved <= endOfDay(-730d) ORDER BY resolved DESC"  --file /atlassian/utilities/jiraPurge/issues.csv

I'm not sure the best way to delete these same issues.  

I have tried the following but it did not work:  

 ./jira --action runFromCsv --file /atlassian/utilities/jiraPurge/issues.csv  --common "--action deleteIssue" --continue       

These are the errors I'm seeing - 

This function requires a non-blank value for parameter issue.
Client error: 4 actions failed from file: /atlassian/utilities/jiraPurge/issues.csv

 

1 answer

0 votes
Deleted user November 22, 2018

Hi @Dawn Peeples,

 

Looks like you are using the same file issues.csv ( which got exported from the first command) for delete issue operation. The reason for that error could be due to the columns are not compatible with parameters that the deleteIssue action is expecting. Following is the sample example which you may find useful. You can make changes to your issues.csv file and include the property file for mapping the issue before performing the deleteIssue action

Example CSV  and corresponding importer.properties file : If you have the files placed in another location please provide the full path to the files.

 mycsvfile.png

"Importer" properties file.

importer-properties.png

 

CLI command to use : 

--action runFromCsv --file samplefile.csv --continue --common "--action deleteIssue" --propertyFile import.properties

Let us know if you have any questions.

Thanks,

Sravya

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events