Re: Updating custom field values using a SOAP C# API

[email protected] Tue, 05 Jul 2011 07:17:57 CDT
Newsgroups gmane.comp.java.jira.user
Message-ID <27157763.651551309868307929.JavaMail.j2ee_forums.atlassian.com@atlassian12.managed.contegix.com>
Hi, 
The following is the code i hv used in java
{code}
public void changeCustomField(final String key)
	{
		try
		{
			intialize();
			RemoteIssue remoteIssue = getJiraSoapService().getIssue(getToken(), key);
			String id=getId();
			
			RemoteFieldValue fieldValue1 = new RemoteFieldValue("customfield_10137", new String[] {appId});
			try
			{
				getJiraSoapService().updateIssue(getToken(),remoteIssue.getKey(),new RemoteFieldValue[]{ fieldValue1});
			}catch (RemoteException e) {			
				e.printStackTrace();
			} 
		}catch (RemoteException e) {			
			e.printStackTrace();
		} catch (ServiceException e) {
			e.printStackTrace();
		}
		
	}
{code}

If you see above, we have used RemoteFieldValue.
RemoteCustomFieldValue is used to get all the custom fields of an issue like below:
{code}
RemoteCustomFieldValue[] customFieldValues = issue.getCustomFieldValues();
{code}
--
Post by anitaj23 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=55144
_______________________________________________
Jira-user mailing list
[email protected]
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user