stable

Clone or download

Read-only

feat: Add from_table_renderer parameter in GET /tracker_reports/{id}/artifacts

This is part of story #23469: export reports with linked artifact in xlsx format A new parameter named from_table_renderer is added to the GET /tracker_reports/{id}/artifacts REST route. If provided, this parameter will allow to return the matching artifacts with the fields used in the table renderer of the report. Artifact link field is not returned in these representations, because of the multiple columns (with or without specific types) that can exist (and because this field will be used in a different way in the XLSX document). If the report has no table renderer or mulitple ones, then an error will be raised. Change-Id: Ifae866e5f4090471c95bb0ea72ea490c1b036071

Modified Files

Name
A plugins/tracker/include/REST/v1/Report/MatchingArtifactRepresentationBuilder.php +145 −0 Go to diff View file
A plugins/tracker/include/REST/v1/Report/MatchingArtifactRepresentationCollection.php +53 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +39 −10 Go to diff View file
A plugins/tracker/include/Tracker/Report/Renderer/Table/TableRendererForReportRetriever.php +44 −0 Go to diff View file
A plugins/tracker/include/Tracker/Report/Renderer/Table/UsedFieldsRetriever.php +56 −0 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report_RendererFactory.class.php +1 −1 Go to diff View file
A plugins/tracker/tests/rest/Report/TrackerReportTest.php +56 −0 Go to diff View file
M plugins/tracker/tests/rest/TrackerBase.php +5 −0 Go to diff View file
A plugins/tracker/tests/rest/_fixtures/TrackerReport/project.xml +663 −0 Go to diff View file
A plugins/tracker/tests/rest/_fixtures/TrackerReport/user_map.csv +1 −0 Go to diff View file
A plugins/tracker/tests/rest/_fixtures/TrackerReport/users.xml +30 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/REST/v1/Report/MatchingArtifactRepresentationBuilderTest.php +259 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Report/Renderer/Table/TableRendererForReportRetrieverTest.php +133 −0 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Report/Renderer/Table/UsedFieldsRetrieverTest.php +71 −0 Go to diff View file