stable

Clone or download

Read-only

feat: Ability to search against custom properties

If project has defined custom properties, then corresponding filter should be displayed in the search criteria panel. No functional changes expected for existing hardcoded properties. Note: it is not possible to offer the same REST API UX between type and list fields. Type (as well as status) values are hardcoded and can be used directly in the REST API ("folder", "wiki", …). However since it is possible to have multiple values with the same label, we can only use their internal id (102, 103, …). Part of story #24197: search for Documents with criteria Change-Id: I7ffe51577b2a1f1b24b656323059591e4dd3eb32

Modified Files

Name
M plugins/docman/include/REST/v1/Folders/SearchReportBuilder.php +42 −8 Go to diff View file
A plugins/docman/include/REST/v1/Search/CustomPropertyRepresentation.php +44 −0 Go to diff View file
M plugins/docman/include/REST/v1/Search/PostSearchRepresentation.php +5 −0 Go to diff View file
M plugins/docman/include/REST/v1/SearchResource.php +23 −0 Go to diff View file
M plugins/docman/tests/unit/REST/v1/Folders/SearchReportBuilderTest.php +139 −3 Go to diff View file
M plugins/document/include/Tree/ListOfSearchCriterionPresenterBuilder.php +25 −13 Go to diff View file
M plugins/document/scripts/document/api/rest-querier.test.ts +18 −0 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/Criteria/CriterionList.vue +2 −1 Go to diff View file
M plugins/document/scripts/document/components/AdvancedSearch/Criteria/__snapshots__/CriterionList.test.ts.snap +8 −0 Go to diff View file
A plugins/document/scripts/document/helpers/additional-custom-properties.ts +33 −0 Go to diff View file
M plugins/document/scripts/document/helpers/build-advanced-search-params.test.ts +4 −3 Go to diff View file
M plugins/document/scripts/document/helpers/get-rest-body-from-search-params.test.ts +29 −2 Go to diff View file
M plugins/document/scripts/document/helpers/get-rest-body-from-search-params.ts +67 −3 Go to diff View file
M plugins/document/scripts/document/helpers/get-router-query-from-search-params.test.ts +5 −0 Go to diff View file
M plugins/document/scripts/document/helpers/get-router-query-from-search-params.ts +36 −1 Go to diff View file
M plugins/document/scripts/document/helpers/is-query-empty.test.ts +2 −0 Go to diff View file
M plugins/document/scripts/document/helpers/is-query-empty.ts +33 −1 Go to diff View file
M plugins/document/scripts/document/po/fr_FR.po +3 −0 Go to diff View file
M plugins/document/scripts/document/router/get-search-props-from-route.test.ts +19 −0 Go to diff View file
M plugins/document/scripts/document/router/get-search-props-from-route.ts +29 −1 Go to diff View file
M plugins/document/scripts/document/type.ts +3 −0 Go to diff View file
M plugins/document/site-content/fr_FR/LC_MESSAGES/tuleap-document.po +0 −3 Go to diff View file
M plugins/document/tests/unit/Tree/ListOfSearchCriterionPresenterBuilderTest.php +52 −6 Go to diff View file