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

Updating Components of existing JIRA issue using either SOAP or REST call

Makarand Keer February 11, 2014

Hi,

Using either SOAP SDK ro REST API I wanted to update Components of existing JIRA issue.

Whatever I checked so far, its not possible using SOAP SDK. Can anybody help me with some sample code.

My client is .net client so any C# code is most welcome

Thanks

Makarand

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
Makarand Keer February 12, 2014

Following is code in c# for how to set components for existing JIRA issue

RemoteFieldValue[] updatedFields00 = new RemoteFieldValue[1];
 
                updatedFields00[0] = new RemoteFieldValue() { id = "components", values = new string[] { "14917","14925" } };
 
                jiraSoapService.updateIssue(token, "REHTEST-876", updatedFields00);


0 votes
Nic Brough -Adaptavist-
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.
February 11, 2014

Hmm. I used SOAP a long time ago to update components, although it was so ling ago, I can't be 100% sure. Anyway, SOAP is deprecated, so I'd move to REST when I could.

https://docs.atlassian.com/jira/REST/latest/has the details on how to do this. I'd use a GET to fetch the current content, then a PUT to replace it with my desired value.

Makarand Keer February 11, 2014

Thanks for updates, I checked SOAP but could not find method to update components on existing issue. Do you have code for REST?

Like vasanth likes this
Nic Brough -Adaptavist-
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.
February 11, 2014

Not to hand, but there's plenty of sample code on the developer sites to update all sorts of fields, and the call to do components is pretty clear in the doc I linked to

Like vasanth likes this
Makarand Keer February 12, 2014

Well i found it in SOAP !!!. Setting Components while creating Issue is different than setting it for Issue Update.

Following is code in c# for how to set components for existing JIRA issue

RemoteFieldValue[] updatedFields00 = new RemoteFieldValue[1];

                updatedFields00[0] = new RemoteFieldValue() { id = "components", values = new string[] { "14917","14925" } };

                jiraSoapService.updateIssue(token, "REHTEST-876", updatedFields00);

Like vasanth likes this
TAGS
AUG Leaders

Atlassian Community Events