Autocomplete group names that contains key
Review Request #8585 — Created Jan. 1, 2017 and discarded
When you have a lot of groups that share a common prefix (e.g. Team_...) it is useful to be able to autocomplete group names without having to type the common prefix. Add a webapi feature that needs to be enabled for the extended search to be enabled. This to avoid problems on installation where enabling contains searches may affect performance too much. Add a new parameter `contains` to /api/groups/ that, when set, changes the filtering from "istartswith" to "icontains" and thus matches the key anywhere in the name (or display name if displayname=1). Change the review request editor view to set this contains=1 in the request and matchContains option on the autocomplete widget to make it all work.
New unit tests passes.
Manual tested that it is possible to autocomplete names without typing the prefix.
Documentation looks ok.
Description | From | Last Updated |
---|---|---|
Col: 20 E127 continuation line over-indented for visual indent |
reviewbot |
- Change Summary:
-
Was able to check the documentation with the fix from https://reviews.reviewboard.org/r/8586/.
- Testing Done:
-
New unit tests passes.
Manual tested that it is possible to autocomplete names without typing the prefix.
~ I have not checked the generated documentation as I can't build it.
~ Documentation looks ok.
- Change Summary:
-
Add a new feature that must be enabled for the search using contains to have effect.
- Description:
-
When you have a lot of groups that share a common prefix (e.g. Team_...) it is
useful to be able to autocomplete group names without having to type the common prefix. + Add a webapi feature that needs to be enabled for the extended search to be
+ enabled. This to avoid problems on installation where enabling contains + searches may affect performance too much. + Add a new parameter
contains
to /api/groups/ that, when set, changes thefiltering from "istartswith" to "icontains" and thus matches the key anywhere in the name (or display name if displayname=1). Change the review request editor view to set this contains=1 in the request and
matchContains option on the autocomplete widget to make it all work. - Commit:
-
79aae6a2f9f4979ccdc6b37f7e5a15f7c9222aa99907fae3f2a6160f23e31d5d303148c3d03a1fdf
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/review_group.py reviewboard/webapi/tests/base.py reviewboard/webapi/tests/test_review_group.py reviewboard/webapi/features.py Ignored Files: reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/review_group.py reviewboard/webapi/tests/base.py reviewboard/webapi/tests/test_review_group.py reviewboard/webapi/features.py Ignored Files: reviewboard/static/rb/js/views/reviewRequestEditorView.js
-
-
Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/review_group.py reviewboard/webapi/tests/base.py reviewboard/webapi/tests/test_review_group.py reviewboard/webapi/features.py Ignored Files: reviewboard/static/rb/js/views/reviewRequestEditorView.js Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/review_group.py reviewboard/webapi/tests/base.py reviewboard/webapi/tests/test_review_group.py reviewboard/webapi/features.py Ignored Files: reviewboard/static/rb/js/views/reviewRequestEditorView.js