stable

Clone or download

Read-only

Refactoring: Extract validation of comparison value

This is part of story #10704 define a query with date fields In order to prepare the introduction of GreaterThan operator in cross trackers for date fields, we need to have a custom way of checking comparison for each types: equal, not equal, greater than, … Therefore to not introduce too much changes in a big review, we prepare the field with the existing comparisons: Equal and NotEqual now have their own comparison checker that is used whenever we know that we are on EqualComparison or a NotEqualComparison. We also rename a bunch of class to better reflect their intent. For example, we don't work on "SemanticField", but on "Metadata". Change-Id: I19d72381373e8766e4067b4b9c54897857d967d6

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +7 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidComparisonCollectorVisitor.php +27 −10 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSearchableCollectorParameters.php +20 −9 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSearchableCollectorVisitor.php +4 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSemantic/ComparisonChecker.php +2 −14 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSemantic/EqualComparisonChecker.php +25 −0 Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSemantic/ICheckSemanticFieldForAComparison.php Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSemantic/MetadataChecker.php +54 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSemantic/NotEqualComparisonChecker.php +25 −0 Go to diff View file
M plugins/crosstracker/include/autoload.php +6 −3 Go to diff View file