Is there a way to archive multiple versions in a JIRA project all in one go?
We have MANY versions in JIRA due to autumatically adding each version after a new build is complete. We now want to be able to efficiently go through and clean this up as quickly and easily as possible.
Any ideas?
You can use JIRA Command Line Interface archiveVersion aciton. It does a single version. If you have a query that determines the versions to be archived, use runFromSql action. Otherwise you can script the archiveVersion in your automation. There is also an unarchiveVersion action. Example: jira --action archiveVersion --project XXXX --version v1234. getVersionList may also be helpful. You will need 2.4.0-SNAPSHOT or higher - https://bitbucket.org/bob_swift/jira-cli/downloads.
Thanks Bob.
I will give this a go once we have upgraded to v4.4.3 OR do you think the existing issues in v4.4.0 won't be a problem for this specific function?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is an old SOAP API, should work on almost any JIRA release.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a few struggles getting CLI working - ended up being I had a % symbol in my password which was doing nasty things to the jira.bat script. Now I have that sorted, I have been able to extract the Version information from the project I want to work on.
Is there a way I can create a file which contains all the versions I want to archive and then pass this into the archiveVersion action?
Im still finding my feet with CLI [obviously :(] so would appreciate any guidance you can offer. BTW - I am beginning to have evil thoughts about all the customisation and automation I can do with this tool - it's very neat! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, run, runFromCsv, and runFromSql actions allow you to run other actions in bulk depending on what information you have. Respectively a file of actions, a csv file of actions or a sql statement that produces lines of actions. Example:
jira --action runFromSql --common "--action archiveVersion" --sql "select version as "version" from ... where ..." --database jira --driver postgresql --dbUser admin --dbPassword admin --host dbserver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the guidance Bob.
Looking at JIRA help file, I can't find archiveVersion. There is a releaseVersion option but not archive. I tried using archiveVersion but this isn't recognise. Does this action actually exist yet?
I have been trying to work out how to use a CSV file which would hold each version I want archived but it is a little difficult for me to work out.
Ideally, the CSV file will contain a list of the versions such as"
"v1.1"
"v1.2"
"v1.3"
etc.
The command line I am trying to use (which I know is wrong but not sure how to fix it) is...
jira --action runFromCSV --file "versions to archive.csv" --common "--action releaseVersion --project "Test Project" --version "
Am I on the right track with this?
Are there any runFromCSV examples I can look at?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
archiveVersion is only in the 2.4.0-SNAPSHOT level - make sure you are using that. Your CSV looks close, you need a column header line: version - that is how it knows what parameter to fill in from the data lines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was wondering how the runFromCSV picked up the variables - but a header makes sense. Thanks for the heads up on 2.4.0-SNAPSHOT - worked a treat.
After a bit of trial and error, I managed to get everything working. For those who come across this thread the CSV file I used was:
<colgroup><col style="width: 60pt;" width="80"/> <col style="width: 48pt;" width="64"/> </colgroup>
project | version |
Test Project | v1.5 |
Test Project | v1.6 |
the command line I used was:
jira --action runFromCSV --file "versions to archive.csv" --common "--action archiveVersion"
Thanks Bob. Would be still scrating my head without your support.
........................,,-~*~,,
......................./:.:.:.:.:.|
......................|;.;.;.;.;./
......................|.;.;.;.;.|
............._,,,,,_.).;.;.;.;.|
.........,,-":.:.:.:."~-,;.;.;.|
........(_,,,,---,,_:.:.);.;.;..",,
......,-":.:.:.:.:.""-,,/;.;.;.;.;.",
.....(:.__,,,,,,,,,___);.;.;.;.;.;|
...../"":.:.:.:.:.:.:¯""\;.;.;.;.;.,"
....\",__,,,,,,,,,,,__/;;;;;;;;;/\
.....\.::.:.:.:.:.:.:.;.);;;;;;;;;/:\
.......\,,,,,---~~~~;;;;;;;;,"::::\
.........."""~~--,,,,,,,,,,-"::::::::::\
...................\::::::::::::::::::::::\
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good to hear :). Still need more documentation to help with this. But your question and posting of solution helps in that direction!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There can always be more documentation ... but I think what is there is great!
I get disheartened when someone asks a question on a forum and then they reply with "worked it out - thanks!" without providing the actual answer - a little extra efforts helps a lot of people - I know I have been helped hundreds of times - we all have I'm sure.
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.