stable

Clone or download

Read-only

feat: Validate ORDER BY @metadata

Part of story #39685 Order artifact according to a field Metadata are now checked when used in ORDER BY - it must be a valid type - if a list, it must be single value list Duck typed field are marked as not implemented yet *Testing:* Try using ORDER BY with all allowed metadata (AllowedMetadata::SORTABLE_NAMES). You should get no errors If it's a list you should get an error if one of the trackers involved has multiple value list. Change-Id: I39cc7bca0f75e61f3ed4e643856243dbed1228d6

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +14 −3 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CrossTrackerArtifactReportFactory.php +3 −1 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/AllowedMetadata.php +12 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidOrderByBuilder.php +36 −1 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidOrderByBuilderParameters.php +52 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/InvalidOrderByListChecker.php +63 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/QueryValidation/Metadata/MetadataChecker.php +38 −0 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +9 −1 Go to diff View file
M plugins/crosstracker/site-content/fr_FR/LC_MESSAGES/tuleap-crosstracker.po +17 −0 Go to diff View file
M plugins/crosstracker/site-content/pt_BR/LC_MESSAGES/tuleap-crosstracker.po +12 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Tests/Report/ArtifactReportFactoryInstantiator.php +11 −1 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidOrderByBuilderTest.php +102 −3 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidOrderByListCheckerTest.php +82 −0 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidSelectablesCollectionBuilderTest.php +8 −0 Go to diff View file
M plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/InvalidTermCollectorVisitorTest.php +9 −1 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/Contributor/ContributorFieldRetriever.php +39 −0 Go to diff View file
A plugins/tracker/include/Tracker/Semantic/Contributor/RetrieveContributorField.php +31 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Semantic/Contributor/ContributorFieldRetrieverTest.php +49 −0 Go to diff View file