Skip to content

Allow multiple negated filters for health and author on issue list

Joseph Wambua requested to merge jj_combined_negated_filter into master

What does this MR do and why?

When filtering issues with multiple is not one of filter criteria for Health and Author, GitLab was bugging out.

This MR fixes that, by allowing GraphQL to accept an array of usernames for Author, and an array of Health Statuses for Health.

Screenshots or screen recordings

Before After
is_not_one_of_health Screen_Recording_2023-10-11_at_11.50.27

How to set up and validate locally

  1. Create several issues in a project
  2. In the issue list, filter using:
    • Author Username: Select multiple authors while using is not one of
    • Health: Select multiple health statusses while using is not one of
  3. Confirm that, in both cases, the page correctly filters the issues, and that it does not bug out while on this branch.

For GraphQL, confirm that the below queries work as expected:

  1. For author username:
query getIssuesEE{
  project(fullPath: "group/project") {
    issues(not: { authorUsername: ["firstUserName", "secondUserName"] }) {
      count
    }
  }
}
  1. For health status:
query getIssuesEE{
  project(fullPath: "group/project3") {
    issues(not: { healthStatusFilter: [onTrack, atRisk] }) {
      count
    }
  }
}

MR acceptance checklist

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

Edited by Joseph Wambua

Merge request reports