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

1 stars 1 forks source link

Bug: Rule 2991Q - Not returning errors #376

Closed SLornieCYC closed 1 year ago

SLornieCYC commented 1 year ago

Describe the bug Rule is returning no errors in CIN Validator whereas I get 58 errors in DFE portal from the same data.

Proposed fix (Optional) No idea what is causing my issue as described above but there are two things that jump out at me as queries from the rule coding (which are probably red herrings):

  1. Should merged_df be a left join rather than an outer join? i.e. all S47s and only matching assessments?

https://github.com/data-to-insight/CIN-validator/blob/dc4559d2362e0efacfe47ebb9b4b3d538c7d0094/cin_validator/rules/cin2022_23/rule_2991Q.py#L37-L44

  1. Should df_ass_issues not be merging on ROW_ID_ass rather than ROW_ID_S47?

https://github.com/data-to-insight/CIN-validator/blob/dc4559d2362e0efacfe47ebb9b4b3d538c7d0094/cin_validator/rules/cin2022_23/rule_2991Q.py#L52-L57

WillLP-code commented 1 year ago

for some reason, on the merge, when testing using an xml, s47 and ass merge even when there is no ass. module in the original xml. Also, if you run on CIN_Census_2021.xml, the assessments df comes through as the cin details df

tab1tha commented 1 year ago

An interesting additional thing is that the errors are being pushed to flag on the "CINdetailsID" column which doesn't exist on the user interface. It is an internal column only. Changing it to flag on "LAchildID" will make the positions pop up in the user interface.