group_work_item_state_counts
Gets or lists a group_work_item_state_counts resource.
Overview​
| Name | group_work_item_state_counts |
| Type | Resource |
| Id | gitlab.work_items.group_work_item_state_counts |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
all_ | integer | Number of work items for the project or group. |
closed | integer | Number of work items with state CLOSED for the project or group. |
opened | integer | Number of work items with state OPENED for the project or group. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | full_path, host | assignee_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_id | Counts 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.
| Name | Datatype | Description |
|---|---|---|
full_path | string | Full path of the group, for example gitlab-org |
host | string | GitLab 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_id | string | Filter by assignee wildcard. Incompatible with assigneeUsernames. |
author_username | string | Filter work items by author username. |
closed_after | string | Work items closed after the date. |
closed_before | string | Work items closed before the date. |
confidential | boolean | Filter for confidential work items. If false, excludes confidential work items. If true, returns only confidential work items. |
created_after | string | Work items created after the timestamp. |
created_before | string | Work items created before the timestamp. |
crm_contact_id | string | Filter by ID of CRM contact. |
crm_organization_id | string | Filter by ID of CRM contact organization. |
due_after | string | Work items due after the timestamp. |
due_before | string | Work items due before the timestamp. |
health_status_filter | string | Health status of the work item, "none" and "any" values are supported. |
iid | string | IID of the work item. For example, "1". |
include_ancestors | boolean | Include work items from ancestor groups. Ignored for project namespaces. |
include_descendants | boolean | Include work items from descendant groups and projects. Ignored for project namespaces. |
iteration_wildcard_id | string | Filter by iteration ID wildcard. |
milestone_wildcard_id | string | Filter by milestone ID wildcard. Incompatible with milestoneTitle. |
my_reaction_emoji | string | Filter by reaction emoji applied by the current user. Wildcard values NONE and ANY are supported. |
release_tag_wildcard_id | string | Filter by release tag wildcard. |
search | string | Search query for title or description. |
sort | string | Sort work items by criteria. |
state | string | Current state of the work item. |
subscribed | string | Work items the current user is subscribed to. |
updated_after | string | Work items updated after the timestamp. |
updated_before | string | Work items updated before the timestamp. |
weight | string | Weight applied to the work item, "none" and "any" values are supported. |
weight_wildcard_id | string | Filter by weight ID wildcard. Incompatible with weight. |
SELECT examples​
- get
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 }}'
;