Skip to main content

issue_field_values

Creates, updates, deletes, gets or lists an issue_field_values resource.

Overview

Nameissue_field_values
TypeResource
Idgithub.issues.issue_field_values

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
issue_field_idinteger (int64)Unique identifier for the issue field.
node_idstring (example: IFT_GDKND)
data_typestringThe data type of the issue field (text, single_select, number, date) (example: text)
single_select_optionobjectDetails about the selected option (only present for single_select fields)
valuestringThe value of the issue field (example: Sample text)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_issue_field_values_for_issueselectowner, repo, issue_numberper_page, pageLists all issue field values for an issue.
add_issue_field_valuesinsertrepository_id, issue_numberAdd custom field values to an issue. You can set values for organization-level issue fields that have been defined for the repository's organization.
Adding an empty array will clear all existing field values for the issue.

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

Only users with push access to the repository can add 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."
set_issue_field_valuesreplacerepository_id, issue_numberSet 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."
delete_issue_field_valuedeleterepository_id, issue_number, issue_field_idRemove a specific custom field value from an issue.

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

If the specified field does not have a value set on the issue, this operation will return a 404 error.

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."

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
issue_field_idintegerThe unique identifier of the issue field.
issue_numberintegerThe number that identifies the issue.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.
repository_idintegerThe unique identifier of the repository.
pageintegerThe page number of the results to fetch. For more information, see "Using pagination in the REST API."
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Lists all issue field values for an issue.

SELECT
issue_field_id,
node_id,
data_type,
single_select_option,
value
FROM github.issues.issue_field_values
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND issue_number = '{{ issue_number }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;

INSERT examples

Add custom field values to an issue. You can set values for organization-level issue fields that have been defined for the repository's organization.
Adding an empty array will clear all existing field values for the issue.

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

Only users with push access to the repository can add 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."

INSERT INTO github.issues.issue_field_values (
issue_field_values,
repository_id,
issue_number
)
SELECT
'{{ issue_field_values }}',
'{{ repository_id }}',
'{{ issue_number }}'
RETURNING
issue_field_id,
node_id,
data_type,
single_select_option,
value
;

REPLACE examples

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."

REPLACE github.issues.issue_field_values
SET
issue_field_values = '{{ issue_field_values }}'
WHERE
repository_id = '{{ repository_id }}' --required
AND issue_number = '{{ issue_number }}' --required
RETURNING
issue_field_id,
node_id,
data_type,
single_select_option,
value;

DELETE examples

Remove a specific custom field value from an issue.

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

If the specified field does not have a value set on the issue, this operation will return a 404 error.

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."

DELETE FROM github.issues.issue_field_values
WHERE repository_id = '{{ repository_id }}' --required
AND issue_number = '{{ issue_number }}' --required
AND issue_field_id = '{{ issue_field_id }}' --required
;