stable

Clone or download

Read-only

Add the possibility to sort the search report in REST route

Part of story #24197 search for Documents with criteria You can test witt the API explorer. Example of sort usage: { "properties": [ { "name": "title", "value": "*a*" }], "sort": [ { "name": "title", "order": "asc" }, { "name": "field_2", "order": "desc" } ], "offset": 0, "limit": 50 } Change-Id: I0bd0b218ca67b4d8f016e5e1661d78fa10e33efc

Modified Files

Name
M plugins/docman/include/Docman_ReportFactory.class.php +2 −2 Go to diff View file
M plugins/docman/include/REST/v1/Folders/SearchReportBuilder.php +1 −1 Go to diff View file
M plugins/docman/include/REST/v1/Search/PostSearchRepresentation.php +5 −0 Go to diff View file
A plugins/docman/include/REST/v1/Search/SearchSortRepresentation.php +38 −0 Go to diff View file
M plugins/docman/include/REST/v1/SearchResource.php +11 −2 Go to diff View file
M plugins/docman/include/Search/ColumnReportAugmenter.php +22 −3 Go to diff View file
A plugins/docman/include/Search/InvalidSortTypeException.php +34 −0 Go to diff View file
A plugins/docman/include/Search/SearchSortPropertyMapper.php +46 −0 Go to diff View file
M plugins/docman/tests/rest/Docman/SearchTest.php +37 −0 Go to diff View file
M plugins/docman/tests/unit/REST/v1/Folders/SearchReportBuilderTest.php +2 −1 Go to diff View file
M plugins/docman/tests/unit/Search/ColumnReportAugmenterTest.php +10 −4 Go to diff View file
A plugins/docman/tests/unit/Search/SearchSortPropertyMapperTest.php +52 −0 Go to diff View file