Description
For administrators, it is nice to be able to get a handle on attachments for JIRA for Jira or Confluence. Both JIRA Both Jira and Confluence support the getAttachmentList action that normally gets attachments for a single entity (JIRA Jira issue or Confluence space). This describes how to do the same thing across the entire product.
Tip | ||
---|---|---|
| ||
Be careful on larger instances as this could take a significant amount of time and resources. You might want to consider splitting up your request or running during off hours. You may need more Java memory for running the client. |
Steps for Confluence
Confluence is easy.
No Format |
---|
–action getAttachmentList --outputFormat 2 --space @all --file list.csv |
Steps
...
for Jira
JIRA is Jira is a bit more involved because it needs to deal (potentially) with a large number of issues and the limitations JIRA limitations Jira has for listing issues with JQL. Unless If you have less more than 1000 issues or , you can split up your request to only deal with < less than 1000 issues at a time, you . You will need to do something like the following. :
- Create a filter that returns all issues. Lets Let's call it all, for example.
- Make this filter is marked as a favorite Favorite for the user that will be running the action.
- Delete or clear the output file. Lets Let's call it list.csv, for example.
Run the following:
No Format --action runFromIssueList --filter all --common "--action getAttachmentList --outputFormat 2 --issue @issue@ --file list.csv --append"
Info | ||
---|---|---|
| ||
|
Steps
...
for Jira - alternative
If each project you have has < less than 1000 issues, then you can get away with something more simple by splitting up the request by project.
- Delete or clear the output file. Lets Let's call it list.csv, for example.
Run the following:
No Format --action runFromProjectList --common "--action runFromIssueList --search ""project = @project@"" --common ""--action getAttachmentList --outputFormat 2 --issue @issue@ --file list.csv --append"" "
Tip | ||||
---|---|---|---|---|
| ||||
See Tips for quoting rules. |