You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seems to be that in rulesValidator.js, testRule(), there are some "idCondition" rules which are handled differently to other rules. The result is that rule violations for this condition is returned from testRule() using the rule name found in the JSON, which uses snake case, and not the mapped rule name which uses camel case. This means that, although the Validator checks for and detects violations of 1.8.13, they don't seem to ever be included in the output JSON because code which produces the output (standardiseResultFormat) is looking for the rule by camel case, but it has been returned as snake case.
I have generated a test file which violates this rule, and when testing this using the Validator, no warning is issued. (Attached) iati-act-error-1.8.13.xml.txt
But more investigation is needed to confirm it is a problem, and scope of the problem. Other rules may be affected. I noticed this just by chance as I was debugging code to identify why the Validator was so slow.
Severity
Medium
The text was updated successfully, but these errors were encountered:
Brief Description
The Validator does not seem to report on ruleset warning 1.8.13 violations in any circumstances.
Ruleset website: https://iatistandard.org/en/iati-standard/203/rulesets/standard-ruleset/
1.8.13 ruleset JSON: https://github.com/IATI/IATI-Rulesets/blob/version-2.03/rulesets/standard.json#L1270
The problem seems to be that in
rulesValidator.js
,testRule()
, there are some "idCondition" rules which are handled differently to other rules. The result is that rule violations for this condition is returned fromtestRule()
using the rule name found in the JSON, which uses snake case, and not the mapped rule name which uses camel case. This means that, although the Validator checks for and detects violations of 1.8.13, they don't seem to ever be included in the output JSON because code which produces the output (standardiseResultFormat
) is looking for the rule by camel case, but it has been returned as snake case.I have generated a test file which violates this rule, and when testing this using the Validator, no warning is issued. (Attached)
iati-act-error-1.8.13.xml.txt
But more investigation is needed to confirm it is a problem, and scope of the problem. Other rules may be affected. I noticed this just by chance as I was debugging code to identify why the Validator was so slow.
Severity
Medium
The text was updated successfully, but these errors were encountered: