Skip to content

Bug with sorting top 10 products in /metrics #6681

Closed
@shipko

Description

@shipko

Hi, everyone!

On page /metrics/product/type we have a bug with sorting list of top 10 product by bug severity.

The error lies in the fact that projects with 0 critical vulnerabilities are displayed at the beginning. After them, projects with the maximum number of errors are displayed (in the correct order).

Steps to reproduce the behavior:

  1. Go to '/metrics/product/type' (for example https://demo.defectdojo.org/metrics/product/type)
  2. Scroll down to "Metric Counts" block
  3. See bug

Expected behavior
Projects with zero values are shown at the end

Screenshots

Bad sorting when project BodgeIt have 0 critical issue. BodgeIt should be shown at the end
Bad sorting when project BodgeIt have 0 critical issue

Good sorting when project BodgeIt have 1 critical issue.
Good sorting when project BodgeIt have 1 critical issue

Deployment method (select with an X)

  • Docker Compose
  • Kubernetes
  • GoDojo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions