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

Atlassian CLI

Jim Yanko November 10, 2011

I'm attempting to automate the creation of a fixversion and actually set the description field as well.

From reading the docs, it looks like I can only do this as a two step process by creating the version, and then updating the description of the existing version once it exists.

https://studio.plugins.atlassian.com/wiki/display/JCLI/Documentation

So i tried this. My method is...

1. obtain a login token,

2. create a fixversion

3. attempt update of fixversion description field

Step 2 succeeds, but Step 3 tells me a resource does not exist - oddly, it appears to be doing something with a os_username and os_password param?

$ LOGIN_TOKEN=$(./atlassian-cli/jira.sh --server http://jira.server --action login  -u $USER  -p $PASS)



$ ./atlassian-cli/jira.sh \

>     --server http://jira.server  \

>     --action addVersion  \

>     --login m3Z29oJj7Y  \

>     --project "DS"  \

>     --version "test-RB-9.9.9"   \

>     --date "12/31/12 02:30 PM"  \

>     -p xxx;

Version 'test-RB-9.9.9' with id 15470 added to project DS as the last version.



$ ./atlassian-cli/jira.sh \

>     --server http://jira.server \

>     --action updateVersion  \

>     --login m3Z29oJj7Y  \

>     --project "DS"  \

>     --version "test-RB-9.9.9"   \

>     --description "Test Release (9.9.9 - Test Description Field )"  \

>     -p xxx;



Remote error: Resource does not exist: http://jira.server/rest/api/latest/version/15470?os_username=automation&os_password=xxx</pre<>>

I've confirmed that I can create multiple versions in succession using the same token - so, something is awry with the updateVersion action somehow. Is it on the server side or is it the api calls being constructed somewhere in /lib/jira-cli-2.2.0.jar ?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
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.
November 10, 2011

Better to open an issue on the JIRA Command Line Interface JIRA. Version support uses both SOAP and REST APIs to get things done, so its not ideal with the later only available for 4.2 and above. So login token will only work for the SOAP side of it.

Jim Yanko November 16, 2011

Thanks Bob. I've opened an issue for this

https://studio.plugins.atlassian.com/browse/JCLI-203

0 votes
Jim Yanko November 10, 2011

Well, excuse the mess - I have NO IDEA - why text in a code block got expanded - that pretty much sucks.

TAGS
AUG Leaders

Atlassian Community Events