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
Community moderators have prevented the ability to post new answers.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.