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

JIRA SOAP API: how to set "Customer Contact Info" field

Jason Novotny
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!
July 7, 2011

Hi,

I'm trying to use the JIRA SOAP API to create a new issue and set the "Customer Contact Info" field. When I create a new issue from JIRA and view HTML source I can see there are fields like "customfield_10032" for this particular field. So I tried...

RemoteIssue issue = new RemoteIssue();

....

RemoteCustomFieldValue customFieldValue = new RemoteCustomFieldValue("customfield_10032", "The cookie monster", new String[]{"10032"});
RemoteCustomFieldValue[] customFieldValues = new RemoteCustomFieldValue[]{customFieldValue};
issue.setCustomFieldValues(customFieldValues);

The issue gets posted to my JIRA studio, however I still don't see "The cookie monster" as expected for the Customer Contact Info field... what am I doing wrong?

Thanks, Jason

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Marco Brizi July 27, 2011

Looking to this example when you create a RemoteCustomFieldValue you don't need to set the second argument (the parent issue key).

http://svn.atlassian.com/svn/public/contrib/jira/jira-rpc-samples/src/java/com/atlassian/jira_soapclient/SOAPClient.java

...
// Add custom fields
RemoteCustomFieldValue customFieldValue =
new RemoteCustomFieldValue(CUSTOM_FIELD_KEY_1, "", new String[]{CUSTOM_FIELD_VALUE_1});
...

In my use of remote API I set the key argument directly to null and it works.

TAGS
AUG Leaders

Atlassian Community Events