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
Community moderators have prevented the ability to post new answers.
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);
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for updates, I checked SOAP but could not find method to update components on existing issue. Do you have code for REST?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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);
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.