Missed Team ’24? Catch up on announcements here.

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

Creating released jira version via rest api

Vasily Sergeev May 22, 2014

I`m tring to create version posting post request on http://<jira_host>/rest/api/2/version with

{"name":"1.70.test", "project":"MIS", "released": true , "userReleaseDate": "23/May/2014"}

according to documentation I can use "released" flag. But created version is not marked as released. I`ve try both

"released": true

and

"released": "true"

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Dennis Markwart January 14, 2015

Creating a Version in JIRA via REST (POST) is really not working, see Link below sad But the Workaround mentioned by @Alex Kalish could be an option.

https://jira.atlassian.com/browse/JRA-31024

1 vote
Alex Kalish September 25, 2014

I'm not sure if this helps, but I ran into the exact same situation.  I could POST to the REST API to create a new version.  However, setting "released" to true never took.  It would always end up as false in JIRA.  However, if I edit the version with subsequent PUT I can successfully set the "released" flag to true wink.

1 vote
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2014

Hello Vasily,

I just tried to execute a REST request as you described. It worked like a charm.

Please, could you check your rest URL? It seems that you missed 2 into your request (/rest/api/2/version instead of /rest/api/version)

Here my code :

jQuery.ajax({
	type : 'POST',
	dataType : 'json',
	contentType : "application/json;",
	async : false,
	url : "http://MY_JIRA_URL/rest/api/2/version",
	data : JSON.stringify({
          "name":"1.70.test", 
          "project":"MIS", 
          "released": true , 
          "userReleaseDate": "23/May/2014"
        }),
	context : document.body,
	success : function(data) {
		returnData = data;
	}
});

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 22, 2014

Hope this helps,

Fabio

Like Davit Yavryan likes this
Vasily Sergeev May 23, 2014

Sorry, I write uri in question wrong. I fix it in question. I use 2 api version

0 votes
nhyland
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 14, 2015

So if I have an API that sets the Released flag to true, why does it still come up in an API JQL query for 

fixVersion in unreleasedVersions() AND status not in (Closed,Done) ORDER BY fixVersion ASC

?

 

But if I use that same query in JIRA (not API, th eGUI), it works, it won't find that release. Any idea?

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 24, 2014

Hey Vasily,

please, could you check if your remote API call is enabled? JIRA Administration -> General Configuration -> Accept remote API calls (ON)

Hope this helps,

Fabio

Vasily Sergeev May 25, 2014

It`s enabled. This request create version with all parameters except "released"

Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 25, 2014

Please, could you provide more information about the error message?

Regards,

Fabio

Vasily Sergeev May 25, 2014

There is no error message. After I call rest service I can see my version created. Its name is "1.70.test" with correct release date. But it is not "released".

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events