Skip to main content

project_issue

Gets or lists a project_issue resource.

Overview​

Nameproject_issue
TypeResource
Idgitlab.issues.project_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
getselectfull_path, hostassignee_id, assignee_wildcard_id, author_username, closed_after, closed_before, confidential, created_after, created_before, crm_contact_id, crm_organization_id, due_after, due_before, epic_id, epic_wildcard_id, health_status_filter, iid, include_subepics, iteration_title, iteration_wildcard_id, milestone_wildcard_id, my_reaction_emoji, release_tag_wildcard_id, search, sort, state, subscribed, updated_after, updated_before, weight, weight_wildcard_idA single issue of the project. Generated from the GitLab GraphQL schema field Project.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
full_pathstringFull path of the project, for example gitlab-org/gitlab
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)
assignee_idstringID of a user assigned to the issues. Wildcard values "NONE" and "ANY" are supported.
assignee_wildcard_idstringFilter by assignee wildcard. Incompatible with assigneeUsername and assigneeUsernames.
author_usernamestringUsername of the author of the issue.
closed_afterstringIssues closed after the date.
closed_beforestringIssues closed before the date.
confidentialbooleanFilter for confidential issues. If "false", excludes confidential issues. If "true", returns only confidential issues.
created_afterstringIssues created after the date.
created_beforestringIssues created before the date.
crm_contact_idstringID of a contact assigned to the issues.
crm_organization_idstringID of an organization assigned to the issues.
due_afterstringReturn issues due on or after the given time.
due_beforestringReturn issues due on or before the given time.
epic_idstringID of an epic associated with the issues, "none" and "any" values are supported.
epic_wildcard_idstringFilter by epic ID wildcard. Incompatible with epicId.
health_status_filterstringHealth status of the issue, "none" and "any" values are supported.
iidstringIID of the issue. For example, "1".
include_subepicsbooleanWhether to include subepics when filtering issues by epicId.
iteration_titlestringFilter by iteration title.
iteration_wildcard_idstringFilter by iteration ID wildcard.
milestone_wildcard_idstringFilter issues by milestone ID wildcard.
my_reaction_emojistringFilter by reaction emoji applied by the current user. Wildcard values "NONE" and "ANY" are supported.
release_tag_wildcard_idstringFilter issues by release tag ID wildcard.
sortstringSort issues by the criteria.
statestringCurrent state of the issue.
subscribedstringIssues the current user is subscribed to.
updated_afterstringIssues updated after the date.
updated_beforestringIssues updated before the date.
weightstringWeight applied to the issue, "none" and "any" values are supported.
weight_wildcard_idstringFilter by weight ID wildcard. Incompatible with weight.

SELECT examples​

A single issue of the project. Generated from the GitLab GraphQL schema field Project.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.project_issue
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND assignee_id = '{{ assignee_id }}'
AND assignee_wildcard_id = '{{ assignee_wildcard_id }}'
AND author_username = '{{ author_username }}'
AND closed_after = '{{ closed_after }}'
AND closed_before = '{{ closed_before }}'
AND confidential = '{{ confidential }}'
AND created_after = '{{ created_after }}'
AND created_before = '{{ created_before }}'
AND crm_contact_id = '{{ crm_contact_id }}'
AND crm_organization_id = '{{ crm_organization_id }}'
AND due_after = '{{ due_after }}'
AND due_before = '{{ due_before }}'
AND epic_id = '{{ epic_id }}'
AND epic_wildcard_id = '{{ epic_wildcard_id }}'
AND health_status_filter = '{{ health_status_filter }}'
AND iid = '{{ iid }}'
AND include_subepics = '{{ include_subepics }}'
AND iteration_title = '{{ iteration_title }}'
AND iteration_wildcard_id = '{{ iteration_wildcard_id }}'
AND milestone_wildcard_id = '{{ milestone_wildcard_id }}'
AND my_reaction_emoji = '{{ my_reaction_emoji }}'
AND release_tag_wildcard_id = '{{ release_tag_wildcard_id }}'
AND search = '{{ search }}'
AND sort = '{{ sort }}'
AND state = '{{ state }}'
AND subscribed = '{{ subscribed }}'
AND updated_after = '{{ updated_after }}'
AND updated_before = '{{ updated_before }}'
AND weight = '{{ weight }}'
AND weight_wildcard_id = '{{ weight_wildcard_id }}'
;