Developer Portal for YouTrack and Hub 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 a custom field along with its value 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 field settings in the particular project.

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

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

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

  • name: the string name of the custom field.

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

  • value: the 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.

Related Resources

Below you can find the list of resources that let you work with this entity.

Attributes

This table describes attributes of the IssueCustomField entity.

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

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

Field

Type

Description

id

String

The ID of the custom field in the issue. Read-only.

name

String

The name of the custom field. Read-only.

projectCustomField

ProjectCustomField

Reference to the custom field settings for the particular project. Read-only.

value

The 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. 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. If you don't set the $top value, the server limits the maximum number of returned entries.

The server returns a maximum of 42 entries for most resources that return collections. For more information, see Pagination.

Sample

Sample request

https://example.youtrack.cloud/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: 7 November 2024