stable

Clone or download

Read-only

refactor: Group together Numeric SQL building

How to test: - Enable the feature flag: tuleap config-set feature_flag_cross_tracker_search_duck_typed_fields 1 - Set up two or three trackers with int or float fields. The fields must have the same shortname, for example "initial_effort". - No functional change for comparisons '=', '!=', '>', '<' for duck-typed numeric fields. Why? The FROM part for duck-typed fields is always the same for numeric fields, for all possible comparisons. Since we are now freed from the visitor pattern for comparison matching, we can merge all the different classes into one and split parts in private methods. We have a clearer view of the SQL involved for numeric fields and the various supported comparisons. part of story #10710 search on fields with duck typing Change-Id: Ic13ff6c36dd3a2bfe30a975023dc3de892a598f2

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +1 −4 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/FieldFromWhereBuilder.php +3 −18 Go to diff View file
D plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/EqualComparisonFromWhereBuilder.php +0 −74 Go to diff View file
D plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/GreaterThanComparisonFromWhereBuilder.php +0 −68 Go to diff View file
D plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/LesserThanComparisonFromWhereBuilder.php +0 −68 Go to diff View file
D plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/NotEqualComparisonFromWhereBuilder.php +0 −75 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/NumericFromWhereBuilder.php +141 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/ParametrizedWhere.php +66 −0 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +1 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/NumericDuckTypedFieldTest.php +3 −7 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/FieldFromWhereBuilderTest.php +1 −4 Go to diff View file