data-to-insight / csc-validator-be-cin

1 stars 1 forks source link

Bug: Rule 8897 - Missing assessments with no factors #385

Closed SLornieCYC closed 1 year ago

SLornieCYC commented 1 year ago

Describe the bug Rule is currently ignoring completed assessments where no factors have been recorded.

To Reproduce Steps to reproduce the problem, e.g.:

Expected behavior CAssessments with no factors recorded should be flagged, in addition to as assessments that use factors that don't exist in the codeset (the latter is working).

Proposed fix (Optional) The number of factors needs counting per assessment and a third condition adding that returns true where countoffactors == 0.

E.g. condition1 & (~condition2 | condition3)

https://github.com/data-to-insight/CIN-validator/blob/dc4559d2362e0efacfe47ebb9b4b3d538c7d0094/cin_validator/rules/cin2022_23/rule_8897.py#L96-L104

WillLP-code commented 1 year ago

I think this should be fixed by my PR #391 which builds assessments blocks for children with no assessment factors, I'd have fixed that one much more quickly if I'd looked at this too!

SLornieCYC commented 1 year ago

Agree, this one looks to have been fixed by PR #391.