django-DefectDojo icon indicating copy to clipboard operation
django-DefectDojo copied to clipboard

Bug with sorting top 10 products in /metrics

Open shipko opened this issue 3 years ago • 0 comments

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
  • [X] Kubernetes
  • [ ] GoDojo

shipko avatar Aug 10 '22 03:08 shipko