stable

Clone or download

Read-only

feat: Group Status invalid checks together and raise IN(OPEN()) as error

Part of story #36833 search on semantics and always there fields even if not defined How to test: - @status IN / NOT IN(OPEN()) should be flagged as invalid instead of causing a PHP Fatal error. - No other functional change. CI should be happy. Why ? IN(OPEN()) was never supported, the query builder does not handle it. This is part of the refactoring of the structure of the query validation to transition away from checks being grouped by comparison type (equals, lesser than, etc). We want to group checks by semantic / field type instead, as it is easier to understand. Most of the time, we work "field by field", so it makes more sense to have all the business rules for a given field in as few files as possible, instead of having all the business rules for "equals" comparisons being grouped together. Furthermore, usage of inheritance makes it hard to keep a mental model of the validation rules for a given field. Change-Id: Ieb98797931d0e8493a190a66dd183e495e73568e

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +2 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/Metadata/FlatInvalidMetadataChecker.php +2 −1 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/Metadata/StatusChecker.php +106 −0 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +2 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Tests/Report/ArtifactReportFactoryInstantiator.php +2 −0 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidTermCollectorVisitorTest.php +6 −2 Go to diff View file