•  
     
    story #24197 search for Documents with criteria
Summary
Empty
search for Documents with criteria
Empty

Overview

2355-overview.gif

As of today, search in Document app is quite poor and relies on search made in the old Docman. Docman search do work but has a few pitfalls:

  • it's ugly when users comes from Document.
  • the search is hard to configure (to by default, if you are looking for document "ID", it's painful to add the criteria before search).
  • the search result has fixed columns and it's inconvenient.

This story is about adding a dedicated search screen into Document app.

The access to search is the same as today, the top right field where the global search can be typed and direct access to filters with "Advanced":2345-documents.png

Search screen

2356-search.png

Search

The underlying REST route will be something like GET /docman_folders/:id/search?...

By default, the search screen propose all the document properties for search. The Hard Coded properties (that are used) as well as the custom ones defined by the project.

In addition to the document properties, there are 2 special search criteria that are available:

  • The actual filename
  • The file type (file, embedded, wiki, link, ...)

The behaviour of the search is the same that is already available with usage of patterns, see the existing search capabilities:

2340-image.png

When searching with multiple criteria (for instance ID & title) the search will be done with a AND: `id=1234 AND title="foo*"` there is no way to make a `OR` query at this stage of implementation.

Search is contextual to the folder where the query is done (ie. search is done in the currently selected sub folder)

The search criteria can be selected (see bellow) but the order is fixed. The first criterion are the one of the mock-up,then custom (project defined) properties are displayed in alphabetical order of the Label.

The search can be bookmarked and shared with a peer.

When the search is done in a specific folder, the breadcrumb is recalled (folders are clickable) and there is a link to search in the root folder (search criteria are kept).2357-screenshot-2021-12-14.jpg

Results

Results are rendered as a table. By default, all the used document properties (hard coded & project defined) are displayed. If the number of columns is too large, there is an horizontal scroll. In addition to the properties, there are 2 special columns that are displayed:

  • The document path (parent folders)
  • The filename when the document is of type "File"

The results are paginated. The default page is 50, not configurable.

The displayed columns can be selected (see bellow) but the order is fixed. The first columns are the one displayed in the mock-up (ID, title, etc) then custom (project defined) properties are displayed in alphabetical order of the label.

When hovering a row, the quicklook button is displayed at the right of the screen (even when the user scrolls). The "quicklook" view cannot be bookmarked.

Sort

Results can be sorted by clicking on the corresponding column (only one column can be selected at the time of this story). The first click on a column sort ASC (a -> z, 1 -> 9, ...) a second click on the column sort DESC (z -> a, 9 -> 1, ...).

By default, sort is done on Last update date DESC (even if the column is not displayed) so the last documents are displayed first.

Search configuration

By default, all the fields are available for search and on table results. However if there are a lot of them, it might difficult to use so, instead of having a full configuration for both project and users (that would be costly to implement) a first configuration level is to allow document administrators to configure the fields that can be used in search and in table results.

As this configuration should only affect a very few number of projects, we decided to limit the feature coverage to the absolute minimum:

  • it's not possible to choose the order of the columns
  • when a new metadata is added, it should be added manually to the configuration to appears in search criteria and columns
  • the configuration is not inherited when projects are duplicated (create project from another one)
  • It's not possible to import/export this configuration via XML

2337-image.png

Empty
Status
Doc/Documentation manager
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#24197
Manuel Vacelet (vaceletm)
2022-07-11 10:47
2021-12-06 10:25
3604

References
Referencing story #24197

Git commit

tuleap/tuleap/stable

Extract search report always there value in a unit tested dedicated object 80e081cf6d
Extract ColumnReportBuilder in a dedicated object c0ca2e5673
Add some typehinting in docman filter d07802f030
Introduce REST route docman_folders/id/search 29c994b5aa
Correct route OPTIONS searh c04b092e2d
Event Add is for by default in ItemRepresentationVisitor f3de5f36ed
Limit and offset must be taken in account in sql query 161b87b7fc
Add parent folders in representation 9e1edaf417
move route under POST docman_search/id ee50fbc4c0
Remove dead code a74dd6da3b
sort is not applied on a specific folder aa3306d940
Improve rest tests dfac583541
have an empty state app (feature flag) bd7943ccd3
feat: Display search criteria panel ff5048e4b0
fix: NavigationDuplicated error cf8bf469e5
feat: Loading state when searching for items 2f2dbd6b9a
feat: Display error state c13d5f2c0f
feat: Start to display search results 8a64854d24
feat: preprocess the item description 52c7fcf1f8
popover on "Global search" text field 8dda7b463f
Limit and offset are not properly applied 47d66627cb
feat: Compute Location column 632a8524b9
feat: Paginate search results 271ecaeb87
feat: Display item icon in search results 8532370fbe
feat: Fine tune the File items icon 1ec7a1f4ad
feat: URL based feature flag 6964698029
feat: Scrollable table 41677a862f
feat: Item results should have link fd941acc97
feat: Introduce breadcrumbs in search criteria 2597e1d854
fix: Fix document e2e tests cd18c43688
Fix Popover icon seems too big 044fabaed9
Fix description with many paragraphs 1d758cdb08
feat: search in whole project documentation 812d099109
Design check ab3eb8572e
chore: Cover new search with e2e tests 57345a3133
chore: Fix (again) documents e2e tests 97be592e50
fix (again again) documents e2e tests fb8d70419e
feat: Ability to search for a specific type ef079d207d
feat: Ability to search for a title 41b9925c0b
Global search should take also search in text/string custom fields 68b7493e92
feat: Ability to search for a description c3cc336e01
feat: Ability to search for an owner e65e2392e9
refactor: Rename query to global_search 832b1aca4b
feat: remove docman administration frontpage c42e268b1e
feat: Introduce BurningParrot in docman admin 20f8ede392
feat: Ability to search for creation|update date 8095512602
feat: Convert obsolete documents admin to BurningParrot db6e1bf926
fix: Docman admin makeover broke e2e tests e53a3545fd
refactor: Backend provides criteria 14d5f5a9d4
chore: remove fixture project for docman 60c05d8333
feat: Add date picker on date criteria 28bed2358a
feat: Ability to search on Obsolescence date 849ed0cee0
fix: wrong definition for allowed search date operator 8d3bf4c6ac
refactor: Transform Type search criteria to generic type "list" 61cc97fd5a
Add table empty state for obsolete and locked document pages 4a082d528b
feat: Ability to search on Status 9273878c20
feat: Convert display preferences admin page to BP 87fb7496dd
feat: Ability to search against custom properties bd79399b7c
refacor: Rearrange Search route parameters 7739f8f9fb
feat: Display custom properties in alphabetic order afe24ad8d6
feat: Inform user that Display settings is for legacy UI 1c3067aa0a
Interactions with global UI components on docman administration pages 4e3779b604
feat: Ability to search against item id 3edabb2325
feat: Ability to search against the filename 87fd8ee954
feat: Hide legacy interface config under hamburger menu 60af361b8c
refactor: Do not hardcode list of columns in FE 4e78c7e9d7
feat: Convert docman perms admin to BurningParrot b9fb3c11bf
feat: Convert available properties admin to BurningParrot b4cabd3378
feat: Add creation date in the list of columns 67134cc3db
feat: Convert property value edition to BP 13dc031e9a
feat: Display status column in search results f939215618
fix: Redirect the user when trying to access to docman administration 6c71f10870
fix: e2e are broken due to docman admin makeover 043e3c7998
feat: Display obsolescence date column in search results b1c2c1cb23
refactor: List of columns depends on list of metadata 2e25b30e0d
feat: display custom properties as column 2cd3ed6ca7
feat: Add owner search information popover aaeb6bdecf
fix(design): Tables of locked and obsolete documents 4545f6c635
chore: Convert Property administration to BurningParrot 91724ffbba
feat: Use @floating-ui for TLP dropdowns a9465a68f5
Fix search result table on small resolutions 817cab1a86
feat: Display dropdown for search results f5b8c53d33
feat: Document search goes GA ? 4e825f8dfe
feat: Title is the first column is search results 2fcadce970
Convert search dropdown with e2e test suite b68412d4ef
feat: Display title on top of other search result columns f26c22e477
chore: Switch popover from popper to floating-ui ce5b921b44
feat: Configure criteria & columns 17e83f7da1
Always there crtieria and column should be displayed in a badge 60512b8305
Add the possibility to sort the search report in REST route 721c6aadb7
Add the possibility to sort the search report in REST route 7bec1bbbb9
fix: empty state on small resolution 5a6c5ac487
fix: no configuration means all criteria 14c5d50447
Be able to sort custom properties with REST 3c93d6553f
Be able to sort the ID column d8b648e251
Apply order in frontend app 512376d47d
fix: Add missing column Filename 1f7f562e6d
fix: Order custom properties by their label df44a81044

Follow-ups

User avatar

Cannot display filename for embedded documents. They have no such information


  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Status changed from On going to Done
User avatar

gerrit #25927 integrated into Tuleap 13.8.99.85


  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Category set to Doc/Documentation manager
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar

The search will be 100% the same than the one available on docman (it's actually the same backend but with a new display). Whatever worked with docman search will work with this new search interface. So, it's not case sensitive.

User avatar

Hi Benjamin/Manuel. Can you confirm search is not case sensitive ? (like it is the case today on Tuleap)

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Attachments image.png, image.png added
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Attachments image.png added