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

Python-side code for the Quality LAC Data Beta frontend
https://903.datatoinsight.org
MIT License
8 stars 4 forks source link

Bug: Derived columns used in rules don't flag error locations #776

Open SLornieCYC opened 4 months ago

SLornieCYC commented 4 months ago

Describe the bug Rules that relate to derived columns (e.g. PL_LA, PL_LOCATION) and have that column selected in affected_fields do not highlight the error location in the FE tool because those derived columns are not exposed to users in the FE data tables.

To Reproduce Have a dataset with Episodes that fail (for example) rules 169 and 179 due to not having a PL_POST recorded. Note that although the error is identified in the list of errors in the FE, the actual row/data is not highlighted because the affected_fields do not exist in the FE.

Proposed fix Amend rules that are based on derived column data to include the original data columns (e.g. PL_POST) in affected_fields so that the error locations are highlighted in the FE.