stable

Clone or download

Read-only

feat: Selected fields are checked with DuckTyping method

Part of story #38263 Choose my own columns based on field name (numeric, text, dates) The DuckTypedFieldChecker need to be tuned as for SELECT Date and Datetime fields are compatibles (not the case for search) *Testing:* All the case should be covered: Valid -> existing and compatible fields Invalid - metadata - non existing fields - incompatible fields between two trackers (e.g list and text are incompatible between them) Change-Id: Ib21324cfe705a96b3fd5059f626f3a84610c2dd5

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +48 −38 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CSV/CSVExportController.php +5 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CrossTrackerArtifactReportFactory.php +15 −2 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/Select/DuckTypedFieldSelect.php +87 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/Select/DuckTypedFieldTypeSelect.php +60 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/Select/FieldIdentifierPropertiesSelect.php +35 −0 Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/DuckTypedFieldType.php Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/DuckTypedField.php Go to diff View file
R plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/DuckTypedField/FieldIdentifierProperties.php Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSearchableCollectorVisitor.php +1 −1 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSelectableCollectorParameters.php +54 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSelectablesCollectionBuilder.php +56 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidSelectablesCollectorVisitor.php +86 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Date/DateFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Datetime/DatetimeFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/FieldFromWhereBuilder.php +12 −12 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/ListFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Numeric/NumericFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/StaticList/StaticListFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/Text/TextFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/UGroupList/UGroupListFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryBuilder/Field/UserList/UserListFromWhereBuilder.php +2 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/DuckTypedField/DuckTypedFieldChecker.php +50 −3 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +33 −28 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Tests/Report/ArtifactReportFactoryInstantiator.php +35 −29 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/DuckTypedField/Select/DuckTypedFieldSelectTest.php +161 −0 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/DuckTypedField/Select/DuckTypedFieldTypeSelectTest.php +116 −0 Go to diff View file
R plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/DuckTypedField/DuckTypedFieldTypeTest.php Go to diff View file
R plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/DuckTypedField/DuckTypedFieldTest.php Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidTermCollectorVisitorTest.php +3 −1 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/QueryValidation/DuckTypedField/DuckTypedFieldCheckerTest.php +72 −28 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +6 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/ExpertQueryValidator.php +45 −13 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Field.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Metadata.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/Selectable.php +8 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/Grammar/SelectableVisitor.php +44 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/IBuildInvalidSelectablesCollection.php +33 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidSelectablesCollection.php +55 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/InvalidSelectablesCollectionBuilder.php +41 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Query/Advanced/SearchablesDoNotExistException.php +24 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/SelectablesAreInvalidException.php +41 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Query/Advanced/SelectablesDoNotExistException.php +53 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report.class.php +12 −5 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +16 −0 Go to diff View file
M plugins/tracker/site-content/pt_BR/LC_MESSAGES/tuleap-tracker.po +10 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Report/Query/Advanced/InvalidSelectablesCollectionBuilderTest.php +45 −0 Go to diff View file
M tests/psalm/tuleap-baseline.xml +5 −51 Go to diff View file