Skip to content

Fix Any filter for labels in Value Stream Analytics

Adam Hegyi requested to merge fix-any-label-queryin-vsa into master

What does this MR do?

This MR fixes the following error when Any label is selected in the filter:

PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE

When the query contains DISTINCT, the columns referenced in the ORDER BY clause should be present in the SELECT.

Steps to reproduce:

  1. Seed your dev environment
  2. Seed VSA: FILTER=cycle_analytics SEED_CYCLE_ANALYTICS=1 bundle exec rake db:seed_fu
  3. Enable the value_stream_analytics_filter_bar feature flag.
  4. Navigate to the created group / analytics / value stream
  5. Filter for labels, select Any
  6. Error should show up in the logs (InvalidColumnReference)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Stan Hu

Merge request reports

Loading