Skip to main content

issue

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

Overview​

Nameissue
TypeResource
Idgitlab.issues.issue

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the issue.
namestringName or title of the object.
project_idintegerID of the issue project.
authorobjectUserCore identity (id, username, name)
blockedbooleanIndicates the issue is blocked.
blocked_by_countintegerCount of issues blocking the issue.
blocking_countintegerCount of issues the issue is blocking.
closed_atstringTimestamp of when the issue was closed.
confidentialbooleanIndicates the issue is confidential.
create_note_emailstringUser specific email address for the issue.
created_atstringTimestamp of when the issue was created.
descriptionstringDescription of the issue.
discussion_lockedbooleanIndicates discussion is locked on the issue.
downvotesintegerNumber of downvotes the issue has received.
due_datestringDue date of the issue.
emails_enabledbooleanIndicates if the parent project or group has email notifications disabled: false if email notifications are disabled.
escalation_statusstringEscalation status of the issue. (TRIGGERED, ACKNOWLEDGED, RESOLVED, IGNORED)
external_authorstringEmail address of non-GitLab user reporting the issue. For guests, the email address is obfuscated.
has_epicbooleanIndicates if the issue belongs to an epic. Can return true and not show an associated epic when the user has no access to the epic.
health_statusstringCurrent health status. (onTrack, needsAttention, atRisk)
hiddenbooleanIndicates the issue is hidden because the author has been banned.
human_time_estimatestringHuman-readable time estimate of the issue.
human_total_time_spentstringHuman-readable total time reported as spent on the issue.
iidstringInternal ID of the issue.
merge_requests_countintegerNumber of merge requests that close the issue on merge.
milestoneobjectMilestone identity (id, title)
movedbooleanIndicates if issue got moved from other project.
referencestringInternal reference of the issue. Returned in shortened format by default.
relative_positionintegerRelative position of the issue (used for positioning in epic tree and issue boards).
severitystringSeverity level of the incident. (UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL)
sla_due_atstringTimestamp of when the issue SLA expires.
statestringState of the issue. (opened, closed, locked, all)
status_page_published_incidentbooleanIndicates whether an issue is published to the status page.
subscribedbooleanIndicates the currently logged in user is subscribed to the issue.
time_estimateintegerTime estimate of the issue.
titlestringTitle of the issue.
total_time_spentintegerTotal time (in seconds) reported as spent on the issue.
typestringType of the issue. (ISSUE, INCIDENT, TEST_CASE, REQUIREMENT, TASK, TICKET)
updated_atstringTimestamp of when the issue was last updated.
upvotesintegerNumber of upvotes the issue has received.
user_discussions_countintegerNumber of user discussions in the issue.
user_notes_countintegerNumber of user notes of the issue.
web_pathstringWeb path of the issue.
web_urlstringWeb URL of the issue.
weightintegerWeight of the issue.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, hostFind an issue. Generated from the GitLab GraphQL schema field Query.issue (Issue).

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
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
idstringGlobal ID of the issue.

SELECT examples​

Find an issue. Generated from the GitLab GraphQL schema field Query.issue (Issue).

SELECT
id,
name,
project_id,
author,
blocked,
blocked_by_count,
blocking_count,
closed_at,
confidential,
create_note_email,
created_at,
description,
discussion_locked,
downvotes,
due_date,
emails_enabled,
escalation_status,
external_author,
has_epic,
health_status,
hidden,
human_time_estimate,
human_total_time_spent,
iid,
merge_requests_count,
milestone,
moved,
reference,
relative_position,
severity,
sla_due_at,
state,
status_page_published_incident,
subscribed,
time_estimate,
title,
total_time_spent,
type,
updated_at,
upvotes,
user_discussions_count,
user_notes_count,
web_path,
web_url,
weight
FROM gitlab.issues.issue
WHERE id = '{{ id }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;