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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0, 3.0.0
    • Fix Version/s: 3.0.22, 2.4.73, 3.1.1
    • 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:
      650
    • Sprint:
      UI - 2023-3, UI - 2023-4, UI COOLDOWN - 2023-3
    • Story Points:
      3

      Description

      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).

        Attachments

        1. elements-1585.mp4
          2.42 MB
          Henry Miskaryan
        2. Screen Recording 2023-04-04 at 10.58.10 AM.mov
          9.62 MB
          rakesh.kumarsingh@contractors.onbase.com
        3. Screenshot 2023-04-05 at 3.07.21 PM.png
          507 kB
          nsingh@ext.nuxeo.com
        4. Screenshot 2023-04-14 at 12.14.08 PM.png
          116 kB
          rakesh.kumarsingh@contractors.onbase.com
        5. Screenshot 2023-04-14 at 12.14.32 PM.png
          180 kB
          rakesh.kumarsingh@contractors.onbase.com
        6. Screenshot 2023-04-14 at 9.57.56 AM.png
          198 kB
          rakesh.kumarsingh@contractors.onbase.com
        7. Screenshot 2023-04-14 at 9.58.25 AM.png
          219 kB
          rakesh.kumarsingh@contractors.onbase.com

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week
                1w