Open SLornieCYC opened 2 years ago
I was just thinking about this very issue - agree this functionality definitely needs to make its way into the tool in some form.
It might do to just infer the relevant tables from the columns listed in affected_fields
, but as pointed out in https://github.com/SocialFinanceDigitalLabs/quality-lac-data-beta-validator/issues/347, some fields are duplicated between tables so that might cause trouble
Otherwise we could update the ErrorDefinition
class to also include the required tables. Bit of a tedious copy/pasting job, and we'd have to make a note to add that to all future rules, but certainly doable.
It'll also take a bit of thought to figure out how best to display this in the frontend. It would be cool to be able to group select/deselect the rules in the 'Validation Rules' & 'Filter' dropdowns based on the affected tables and/or fields
Related to #45. The tool should probably flag up validations that have not run because the applicable data was not provided.
For example if the user accidentally misses out the OC3 csv entirely they might like to know that rules 131-133 (etc) could not be tested, rather than being left with the impression there are no errors with their data. Similarly for rules that depend on previous year data it would be useful to remind/highlight that those validations haven't been run when the relevant previous year data has not been loaded.
On the other hand I can see benefits to being able to intentionally upload only a single file or subset of files/data for validation so would not like to see any changes which would prevent that behaviour. Maybe any such warnings (this or #45) should be in expandable panes like the existing selection list of validation rules?