issues

Set issue field values for an issue

Set custom field values for an issue, replacing any existing values. You can set values for organization-level issue fields that have been defined for the repository's organization.

This endpoint supports the following field data types:

  • text: String values for text fields
  • single_select: Option names for single-select fields (must match an existing option name)
  • number: Numeric values for number fields
  • date: ISO 8601 date strings for date fields

This operation will replace all existing field values with the provided ones. If you want to add field values without replacing existing ones, use the POST endpoint instead.

Only users with push access to the repository can set issue field values. If you don't have the proper permissions, you'll receive a 403 Forbidden response.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."

put/repos/{owner}/{repo}/issues/{issue_number}/issue-field-values

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

issue_numberinteger required

The number that identifies the issue.

Request body

Example request

{
  "issue_field_values": [
    {
      "field_id": 123
    }
  ]
}

Response

Response

issue_field_idinteger required

Unique identifier for the issue field.

issue_field_namestring

The human-readable name of the issue field.

node_idstring required
data_type'text' | 'single_select' | 'multi_select' | 'number' | 'date' required

The data type of the issue field

Example response

[
  {
    "issue_field_id": 1,
    "issue_field_name": "Priority",
    "node_id": "IFT_GDKND",
    "data_type": "text",
    "value": "Sample text",
    "single_select_option": {
      "id": 1,
      "name": "High",
      "color": "red"
    },
    "multi_select_options": [
      {
        "id": 1,
        "name": "High",
        "color": "red"
      }
    ]
  }
]

Changes

Changed in 3 of the 62 revisions of this API.13

  • 2022-11-28fd784b1d2c891See the full diff
    • added the optional property items/issue_field_name to the response with the 200 status

      response-optional-property-added

  • 2022-11-28cb5598bcb83211See the full diff
    • added the new multi_select enum value to the items/data_type response property for the response status 200

      response-property-enum-value-added

    • added the optional property items/multi_select_options to the response with the 200 status

      response-optional-property-added

  • 2022-11-28de37da78f5221See the full diff
    • endpoint added

      endpoint-added

Of the 62 revisions, 1 has no diff computed.