feat: add status and healtstatus filters

What does this MR do?

Adds health_status_filter and status filter parameters to the work item listing tool, enabling more granular filtering of work items in Duo Chat.

Changes

Health Status Filter

  • Added health_status_filter parameter to ListWorkItemsInput
  • Supports filtering by: onTrack, needsAttention, atRisk
  • Updated GraphQL queries for both group and project work items

Status Filter

  • Added status parameter to ListWorkItemsInput
  • Supports filtering by: To do, In progress, Done, Won't do, Duplicate
  • Implemented as a dictionary with name key to match GraphQL StatusInput structure
  • Added status widget to project work items query response

Technical Details

  • Updated FILTER_KEY_MAPPING to include both new filters
  • Created StatusFilter enum with all valid status values
  • Modified both LIST_GROUP_WORK_ITEMS_QUERY and LIST_PROJECT_WORK_ITEMS_QUERY
  • Added test coverage for both filters

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab/-/work_items/580661

How to set up and validate locally

With this branch active in ai gateway, ask in the monolith in the agentic chat: hi, can you show me issues that are at risk? (prepare some that have this health status). The call to the tool should include filter and should return only work items with this health status.

also please set status on some issues and then ask: what work items has status in progress? (or other). The call to the tool should include filter and should return only work items with this status.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
  • If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Edited by Gosia Ksionek

Merge request reports

Loading