Skip to main content

group_work_item

Gets or lists a group_work_item resource.

Overview​

Namegroup_work_item
TypeResource
Idgitlab.work_items.group_work_item

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringGlobal ID of the work item.
namestringName or title of the object.
closed_atstringTimestamp of when the work item was closed.
confidentialbooleanIndicates the work item is confidential.
create_note_emailstringUser specific email address for the work item.
created_atstringTimestamp of when the work item was created.
descriptionstringDescription of the work item.
duplicated_to_work_item_urlstringURL of the work item that the work item is marked as a duplicate of.
hiddenbooleanIndicates the work item is hidden because the author has been banned.
iidstringInternal ID of the work item.
importedbooleanIndicates whether the work item was imported.
lock_versionintegerLock version of the work item. Incremented each time the work item is updated.
moved_to_work_item_urlstringURL of the work item that the work item was moved to.
promoted_to_epic_urlstringURL of the epic that the work item has been promoted to.
referencestringInternal reference of the work item. Returned in shortened format by default.
statestringState of the work item. (OPEN, CLOSED)
titlestringTitle of the work item.
updated_atstringTimestamp of when the work item was last updated.
user_discussions_countintegerNumber of user discussions in the work item.
web_pathstringWeb path of the object.
web_urlstringURL of the object.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_path, iid, hostFind a work item by IID directly associated with the group. Generated from the GitLab GraphQL schema field Group.workItem (WorkItem).

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 group, for example gitlab-org
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)
iidstringIID of the work item.

SELECT examples​

Find a work item by IID directly associated with the group. Generated from the GitLab GraphQL schema field Group.workItem (WorkItem).

SELECT
id,
name,
closed_at,
confidential,
create_note_email,
created_at,
description,
duplicated_to_work_item_url,
hidden,
iid,
imported,
lock_version,
moved_to_work_item_url,
promoted_to_epic_url,
reference,
state,
title,
updated_at,
user_discussions_count,
web_path,
web_url
FROM gitlab.work_items.group_work_item
WHERE full_path = '{{ full_path }}' -- required
AND iid = '{{ iid }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;