As a user configuring ReportStream
I want validation to catch invalid configurations that are syntactically correct
so that I can avoid misconfiguring ReportStream components intentionally or otherwise.
Description/Use Case
The conditionFilter supersedes the mappedConditionFilter in specificity; therefore these filters are mutually exclusive to avoid compound condition filters leading to unexpected filtering outcomes. This is checked when evaluating the filters, but we should also prevent them from being configured.
Risks/Impacts/Considerations
We may want to reconsider if there is ever a valid scenario for having both filters configured.
Dev Notes
May be possible at the json schema level
Very doable at the konform level
something like: addConstraint("must be mutually exclusive", test = { receiver -> !(receiver.mappedConditionFilter.isNotEmpty() && receiver.conditionFilter.isNotEmpty()) })
Acceptance Criteria
Settings validation ensures no receivers have both a mappedConditionFilter and a conditionFilter
User Story
As a user configuring ReportStream I want validation to catch invalid configurations that are syntactically correct so that I can avoid misconfiguring ReportStream components intentionally or otherwise.
Description/Use Case
The
conditionFilter
supersedes themappedConditionFilter
in specificity; therefore these filters are mutually exclusive to avoid compound condition filters leading to unexpected filtering outcomes. This is checked when evaluating the filters, but we should also prevent them from being configured.Risks/Impacts/Considerations
We may want to reconsider if there is ever a valid scenario for having both filters configured.
Dev Notes
addConstraint("must be mutually exclusive", test = { receiver -> !(receiver.mappedConditionFilter.isNotEmpty() && receiver.conditionFilter.isNotEmpty()) })
Acceptance Criteria
mappedConditionFilter
and aconditionFilter