Project

General

Profile

Actions

Bug #2704

closed

The compliance % in the rule detail is not correctly computed

Added by Nicolas CHARLES over 12 years ago. Updated over 12 years ago.

Status:
Released
Priority:
1 (highest)
Category:
Web - Compliance & node report
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The % in the rule detail is not valid : it takes the worst value, which is far from what I expected (it seems related to e1658fe73e53dadf46130f23de9c7d386149bc12 of ticket #2700 )

The compliance % shoud be computed as an average of all the compliance of their subcomponent.

for instance
Rule 1 66%

Directive 1 33%

Comp1 100%
Comp2 0%
Comp3 0%

Directive 2 100%

Comp1 100%

(so that a directive with zillions components wont positively or negatively impact the total

Actions #1

Updated by Vincent MEMBRÉ over 12 years ago

  • Status changed from 2 to Pending technical review
  • % Done changed from 0 to 100
Actions #2

Updated by Nicolas CHARLES over 12 years ago

  • Status changed from Pending technical review to Discussion

Vincent,

I'm not 100% sure about this, for two reason :
  1. The rounding are a bit eager, everything is handled as Int, and in some easy case, (3 nodes, half directives ok) I can have 49% rather that 50%
    Using doubles would be more suitable
  1. i'm not sure of how compliance shoud be counted
directive component value status nodeid
policy component one success node1
policy component2 one success node1
policy2 component one success node1
policy2 component2 one success node1
policy component one success node2
policy component2 one success node2
policy2 component one success node2
policy2 component2 one NoAnswer node2
policy component one NoAnswer node3
policy component2 one NoAnswer node3
policy2 component one NoAnswer node3
policy2 component2 one NoAnswer node3

This returns 49% (could have been 50?)

Possibility : policy2 could be 33% (only one full) or 50% (one full, one half), so results could vary
I guess the first is the best (and the one implemented), but it has to be validated

Actions #3

Updated by Vincent MEMBRÉ over 12 years ago

  • Status changed from Discussion to Pending technical review

We decided to change the compliance computation from average to worst compliance, so now Nicolas you should have now 33% percent as a result for the case you suggest

We fixed the computation to round the results more precisely too.

Thanks!

Actions #4

Updated by Nicolas CHARLES over 12 years ago

  • Status changed from Pending technical review to Released

Thank you Vincent, this looks correct !

Actions

Also available in: Atom PDF