Skip to content

Add filters to group.workItems query

Mario Celi requested to merge 419975-add-query-filters into master

What does this MR do and why?

Adds filters to the group.workItems GraphQL field. For now only the same filters we have at project.workItems.

How to set up and validate locally

  1. Enable the feature flag in Rails console Feature.enable(:namespace_level_work_items)
  2. Create multiple group level work item with the following query at http://127.0.0.1:3000/-/graphql-explorer so you can test filters in the next query
    mutation {
       workItemCreate(input: {namespacePath: "flightjs", title: "test group level work item", workItemTypeId: "gid://gitlab/WorkItems::Type/1"}) {
         errors
         workItem {
           id
         }
       }
     }
  3. Use filters in the group.workItems query
    {
       group(fullPath: "flightjs") {
         name
         workItems(types: [ISSUE], state: opened) {
           nodes {
             id
             iid
             title
             widgets {
               ... on WorkItemWidgetDescription {
                 type
                 description
               }
             }
           }
         }
       }
     }

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #419975 (closed)

Edited by Mario Celi

Merge request reports

Loading