Uploaded image for project: 'Nuxeo Web UI'
  1. Nuxeo Web UI
  2. WEBUI-1101

Fix nuxeo-directory-suggestion failing to save "false" value on Boolean property



    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0
    • Fix Version/s: 3.1.x, 3.0.22, 2.4.73
    • Component/s: UI, Web UI
    • Release Notes Summary:
      The nuxeo-directory-suggestion element manages to save the "false" value used in a search form.
    • Backlog priority:
    • Sprint:
      UI - 2023-3, UI - 2023-4, UI COOLDOWN - 2023-3
    • Story Points:


      When having equipped a search form with a nuxeo-directory-suggestion tied to a Page Provider predicate for a Boolean schema property, Saved Searches from this form fail to save the input value of "false".
      Steps to reproduce:

      1. Create a YesNo_Bool Vocabulary with these 2 entries :
        ID: true, label: Yes
        ID: false, label: No
      1. Make a custom Document type with a Boolean field (in example jar attached, doctype is InvoiceTwo, and field is invoicetwo:discount)
      2. In the document Create layout, have the Boolean field configurable with a checkbox element.
      3. Make a custom Page Provider with a predicate on the Boolean field using the equals operator (in example, pp_InvoiceTwoSearch)
      4. Add the Boolean field in the search form layout using a nuxeo-directory-suggestion element for the Boolean field.
      5. Enable the search as a Drawer item accessible from the left-hand drawer.
      6. Create two of these documents - one with Boolean field checked (to have value true), the other checked and then unchecked (value false).
      7. Go to the search form (InvoiceTwo Search in the example) and select the "No" value from the widget.
      8. Hit the search button - observe the document with value False is returned.
      9. Save this search (with name "No Discount for example).
      10. Refresh the browser and navigate back to the saved search.

      Expected behavior: the saved search is returned with "No" populated in the nuxeo-directory-suggestion, and the only Document returned is the one with "false" for its Boolean property.

       Actual Behavior: the saved search is returned with the nuxeo-directory-suggestion blank, and both Documents are returned in the search.

      Note: this is not reproducible while populating the widget with Yes ("true"), as the Saved Search preserves the value as expected.

      (see attached video - Studio project zips attached have set up doctype, search, and vocabulary needed to reproduce the issue).




            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - 0 minutes
                Remaining Estimate - 0 minutes
                Time Spent - 1 week