Skip to content

Commit

Permalink
fixed the burndown calculation to start with the numnber of findings …
Browse files Browse the repository at this point in the history
…that are still active
  • Loading branch information
lme-nca committed Nov 15, 2023
1 parent 9ed4be5 commit 411748d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions dojo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2528,11 +2528,16 @@ def get_open_findings_burndown(product):
curr_date = datetime.combine(datetime.now(), datetime.min.time())
start_date = curr_date - timedelta(days=90)

critical_count = len(list(findings.filter(date__lt=start_date).filter(severity='Critical')))
high_count = len(list(findings.filter(date__lt=start_date).filter(severity='High')))
medium_count = len(list(findings.filter(date__lt=start_date).filter(severity='Medium')))
low_count = len(list(findings.filter(date__lt=start_date).filter(severity='Low')))
info_count = len(list(findings.filter(date__lt=start_date).filter(severity='Info')))
critical_count = len(list(findings.filter(date__lt=start_date, is_mitigated=False, active=True)
.filter(severity='Critical')))
high_count = len(list(findings.filter(date__lt=start_date, is_mitigated=False, active=True)
.filter(severity='High')))
medium_count = len(list(findings.filter(date__lt=start_date, is_mitigated=False, active=True)
.filter(severity='Medium')))
low_count = len(list(findings.filter(date__lt=start_date, is_mitigated=False, active=True)
.filter(severity='Low')))
info_count = len(list(findings.filter(date__lt=start_date, is_mitigated=False, active=True)
.filter(severity='Info')))

running_min, running_max = float('inf'), float('-inf')
past_90_days = {
Expand Down

0 comments on commit 411748d

Please sign in to comment.