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

Scripting to duplicate attachments from jira into a fileshare

Scott Harman
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.
July 20, 2015

Hi guys

I've had a bit of a request which I started out thinking was a bit nutty -

but I'm now starting to think is actually entirely sane, and I'm liking it more and more I think about it

 

We typically attach a couple of zip files of html logs to every incident logged by a customer, and contains a large amount of text as well as a well formed block of error text.

One of our developers has a pet project to drill down into these, and get some data about what kinds of errors are occurring, and what their system looks like.

What we want to do is use either the CLI or Groovy runner to iterate through every issue, and for each customer name, create a new folder for it's incident or logged bug, and chuck all 7z, rar, zip, html file into it.

Then I can just bulk process all the files, and extract product versions, server versions, crash text and error text and dump it into a slightly more usable format.

We have about 60k issues across about 200 customers that we would want to check, but only about 40k have attachments (so it makes any manual approach a bit impractical)

By the same token, taking a copy of the JIRA attachments folder won't really allow us to find which incident and customer it's applicable to.

Does anyone have any clever ideas, or a better alternative approach we might be able to use?

Cheers

Scott

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 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.
July 21, 2015

You should be able to use the JIRA Command Line Interface (CLI) to help with this. Perhaps you will also need a bit of scripting the more you want to do. 

 

 

0 votes
Matthias Gaiser _K15t_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 20, 2015

I don't know if this is true for all JIRA instances, but in my data folder, the attachments are stored per project and issue. For the storing the internal JIRA id will be used. If you have the same setup and want to avoid that you have to download all the files, you could just copy the attachments on your disk and only get the metadata via the (REST or any other) API of JIRA.

TAGS
AUG Leaders

Atlassian Community Events