YouTrack Standalone 2020.6 Help

Issue Custom Fields

This resource lets you work with custom fields of the issue.

Resource

/api/issues/{issueID}/customFields

Returned entity

IssueCustomField. For the description of the entity attributes, see Supported Fields section.

Supported methods

IssueCustomField attributes

Represents the value of the custom field in the particular issue.

The IssueCustomField is an abstract ancestor for all types of custom fields in issues. The actual type of the custom field depends on settings of the particular project.

Each IssueCustomField entity, regardless of its type, has the following attributes:

  • projectCustomField: the reference to the settings of the custom field in the project.

  • value: the actual value assigned to the custom field in the issue. Depending on the type of the field, this attribute can store a single value or an array of values.

  • name: the string name of the custom field.

  • id: the entity ID of the issue custom field.

  • $type: the unique type of the issue custom field. You must provide this attribute when you update the custom field in an issue.

Because of the implementation specifics, the generated table for IssueCustomField attributes contains only the name attribute. See the description of the descendant entities for the supported attributes and their types.

This table describes attributes of the IssueCustomField entity.

  • To receive an attribute in the response from server, specify it explicitly in the request parameter fields.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

name

String

The name of the custom field. Read-only.

Read a List of IssueCustomFields

Get the list of available custom fields of the issue.

Request syntax

GET /api/issues/{issueID}/customFields?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

String

A list of IssueCustomField attributes that should be returned in the response. If no field is specified,only the entityID is returned

$skip

Int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

Int

Optional. Lets you specify the maximum number of entries that are returned in the response.

Sample

Sample request

https://example.myjetbrains.com/youtrack/api/issues/2-7/fields?fields=id,name,value(id,name)

Sample response body

[ { "value": { "name": "Major", "id": "67-2", "$type": "EnumBundleElement" }, "name": "Priority", "id": "92-1", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Bug", "id": "67-5", "$type": "EnumBundleElement" }, "name": "Type", "id": "92-2", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Fixed", "id": "69-7", "$type": "StateBundleElement" }, "name": "State", "id": "92-3", "$type": "StateIssueCustomField" }, { "value": { "name": "Jane Doe", "id": "1-3", "$type": "User" }, "name": "Assignee", "id": "94-0", "$type": "SingleUserIssueCustomField" }, { "value": null, "name": "Subsystem", "id": "92-0", "$type": "SingleOwnedIssueCustomField" }, { "value": [ { "name": "2019.1", "id": "133-19", "$type": "VersionBundleElement" } ], "name": "Fix versions", "id": "92-4", "$type": "MultiVersionIssueCustomField" }, { "value": [], "name": "Affected versions", "id": "92-5", "$type": "MultiVersionIssueCustomField" }, { "value": null, "name": "Fixed in build", "id": "92-6", "$type": "SingleBuildIssueCustomField" } ]
Last modified: 30 March 2021