stable

Clone or download

Read-only

feat: Introduce structure to create XTS API return

Part of story #38263 Choose my own columns based on field name (numeric, text, dates) To be able to create return format of API return we need first to have a structure which help us to build it BREAKING CHANGE: /api/cross_tracker_reports/{id}/content REST endpoint changed its default return format to "selectable". If you wish to use the previous return format, please add a parameter `return_format=static` Note: Cross-tracker search widgets have been updated to request the static return format, no change expected. *Testing:* Go to plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.ts L80 and change "static" by "selected", then pnpm build. In browser console, tab networks, you should see something like that for the query to /api/v1/cross_tracker_reports/<N>/content ```json { "artifacts": [], "selected": [], "total_size": <number>, } ``` Change-Id: I2f976e8d7aa91daade7669091d358c302895c510

Modified Files

Name
M plugins/crosstracker/include/CrossTracker/REST/v1/CrossTrackerReportsResource.php +45 −16 Go to diff View file
A plugins/crosstracker/include/CrossTracker/REST/v1/Representation/CrossTrackerReportContentRepresentation.php +42 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/REST/v1/Representation/CrossTrackerSelectedRepresentation.php +38 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/REST/v1/Representation/CrossTrackerSelectedType.php +33 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/REST/v1/Representation/LegacyCrossTrackerReportContentRepresentation.php +39 −0 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CSV/CSVExportController.php +5 −2 Go to diff View file
M plugins/crosstracker/include/CrossTracker/Report/CrossTrackerArtifactReportFactory.php +46 −6 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilder/Field/FieldResultBuilder.php +89 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilder/ResultBuilderVisitorParameters.php +40 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilder/SelectedValue.php +32 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilder/SelectedValueRepresentation.php +27 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilder/SelectedValuesCollection.php +37 −0 Go to diff View file
A plugins/crosstracker/include/CrossTracker/Report/Query/Advanced/ResultBuilderVisitor.php +76 −0 Go to diff View file
M plugins/crosstracker/include/crosstrackerPlugin.php +14 −3 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.test.ts +2 −1 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.ts +2 −0 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/DateDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/DatetimeDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/NumericDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/OpenStaticListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/OpenUGroupListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/OpenUserListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/StaticListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/TextDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/UGroupListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/DuckTypedField/UserListDuckTypedFieldTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/ArtifactIdMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/AssignedToMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/DescriptionMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/LastUpdateByMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/LastUpdateDateMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/StatusMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/SubmittedByMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/SubmittedOnMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Report/Query/Advanced/Metadata/TitleMetadataTest.php +5 −4 Go to diff View file
M plugins/crosstracker/tests/integration/CrossTracker/Tests/Report/ArtifactReportFactoryInstantiator.php +13 −2 Go to diff View file
M plugins/crosstracker/tests/rest/CrossTracker/CrossTrackerTest.php +3 −3 Go to diff View file
M plugins/crosstracker/tests/rest/CrossTracker/CrossTrackerTestExpertQueryTest.php +1 −1 Go to diff View file
A plugins/crosstracker/tests/unit/CrossTracker/Report/Query/Advanced/ResultBuilder/Field/FieldResultBuilderTest.php +111 −0 Go to diff View file