Working with custom fields and SOAP
We have seen how to create an issue with its standard fields. In this recipe, we will deal with custom fields—create, update, and read their values.
Getting ready
As in the previous recipe, create a JIRA SOAP client.
How to do it...
As mentioned earlier, we will see the creation, updating, and browsing of custom field values separately in this recipe.
Creating an issue with custom field values
Creating an issue with custom fields is pretty similar to creating issues with components or versions. All the custom fields are set on the issue using a single method setCustomFieldValues
, which takes an array of
RemoteCustomFieldValue
objects.
The following steps explain how it's done:
Identify the custom fields that need to be set on the issue and find their IDs. The ID of a custom field is of the form
customfield_[id]
where[id]
is the database ID of the custom field. This ID can be determined from the database, or by editing a custom field in the admin interface, and...