Skip to main content

group_work_item_state_counts

Gets or lists a group_work_item_state_counts resource.

Overview​

Namegroup_work_item_state_counts
TypeResource
Idgitlab.work_items.group_work_item_state_counts

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
all_integerNumber of work items for the project or group.
closedintegerNumber of work items with state CLOSED for the project or group.
openedintegerNumber of work items with state OPENED for the project or group.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_path, hostassignee_wildcard_id, author_username, closed_after, closed_before, confidential, created_after, created_before, crm_contact_id, crm_organization_id, due_after, due_before, health_status_filter, iid, include_ancestors, include_descendants, iteration_wildcard_id, milestone_wildcard_id, my_reaction_emoji, release_tag_wildcard_id, search, sort, state, subscribed, updated_after, updated_before, weight, weight_wildcard_idCounts of work items by state for the namespace. Generated from the GitLab GraphQL schema field Group.workItemStateCounts (WorkItemStateCountsType).

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)
assignee_wildcard_idstringFilter by assignee wildcard. Incompatible with assigneeUsernames.
author_usernamestringFilter work items by author username.
closed_afterstringWork items closed after the date.
closed_beforestringWork items closed before the date.
confidentialbooleanFilter for confidential work items. If false, excludes confidential work items. If true, returns only confidential work items.
created_afterstringWork items created after the timestamp.
created_beforestringWork items created before the timestamp.
crm_contact_idstringFilter by ID of CRM contact.
crm_organization_idstringFilter by ID of CRM contact organization.
due_afterstringWork items due after the timestamp.
due_beforestringWork items due before the timestamp.
health_status_filterstringHealth status of the work item, "none" and "any" values are supported.
iidstringIID of the work item. For example, "1".
include_ancestorsbooleanInclude work items from ancestor groups. Ignored for project namespaces.
include_descendantsbooleanInclude work items from descendant groups and projects. Ignored for project namespaces.
iteration_wildcard_idstringFilter by iteration ID wildcard.
milestone_wildcard_idstringFilter by milestone ID wildcard. Incompatible with milestoneTitle.
my_reaction_emojistringFilter by reaction emoji applied by the current user. Wildcard values NONE and ANY are supported.
release_tag_wildcard_idstringFilter by release tag wildcard.
sortstringSort work items by criteria.
statestringCurrent state of the work item.
subscribedstringWork items the current user is subscribed to.
updated_afterstringWork items updated after the timestamp.
updated_beforestringWork items updated before the timestamp.
weightstringWeight applied to the work item, "none" and "any" values are supported.
weight_wildcard_idstringFilter by weight ID wildcard. Incompatible with weight.

SELECT examples​

Counts of work items by state for the namespace. Generated from the GitLab GraphQL schema field Group.workItemStateCounts (WorkItemStateCountsType).

SELECT
all_,
closed,
opened
FROM gitlab.work_items.group_work_item_state_counts
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
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 health_status_filter = '{{ health_status_filter }}'
AND iid = '{{ iid }}'
AND include_ancestors = '{{ include_ancestors }}'
AND include_descendants = '{{ include_descendants }}'
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 }}'
;