Issue export to CSV ignores negative label filter

Summary

See title & steps below. Related to #1926 (closed).

Steps to reproduce

In a project with some labelelled issues

  1. Apply a != filter for a particular label.
  2. Try exporting those issues as a CSV.
  3. Check number of rows in resulting email attachment.

Example Project

https://gitlab.com/gitlab-com/support/toolbox/zd-dl-wiper/-/issues?scope=all&state=all&label_name[]=bug

What is the current bug behavior?

  • CSV is not filtered as the UI suggests

What is the expected correct behavior? A GitLab Ultimate customer reported this problem internally.

  • CSV is filtered as the UI suggests, and as is possible without a != label filter.

Relevant logs and/or screenshots

  • UI says 6:

image

  • Email contains 7 (note the Investigate minitar RuntimeError: That ~bug shouldn't be exported):

image

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by Katrin Leinweber