Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-28161

Wrong agreggation filter counts when unclicked

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF17, 11.1, 2021.0
    • Component/s: Web UI
    • Release Notes Summary:
      The aggregation count is correctly recomputed when an aggregate is unchecked.
    • Backlog priority:
      500
    • Sprint:
      nxGang Sprint 11.1.19
    • Story Points:
      2

      Description

      1. setup a pageprovider with an aggregate on the document type
      2. make the search form and results appear in a tab
      3. create a document of the same type
      4. unfold the filter
      5. observe the params are empty (see notyetclicked.png)
      6. in the filter click the aggregate once
      7. observe the JSON on the right contains 1 result (see clicked.png)
      8. fold the filter
      9. observe the count is 1 (see clicked2.png)
      10. unfold the filter
      11. uncheck the aggregate (see unclicked.png)
      12. fold the filter
      13. observe the count is 1 (see unclicked2.png)

      Expected behavior: the count should be 0 and not visible
      Pre-analysis: this seems to be due to the following line
      https://github.com/nuxeo/nuxeo-web-ui/blob/10.10/elements/search/nuxeo-results-view.html#L302
      When it has never been clicked then it works but once one or more aggregates have been clicked, the params are set with a length of 0.
      Suggestion: on top of checking if the params are empty, it should check the length of each aggregates. If they are all equal to 0 then the count should be 0 and not be displayed.

        Attachments

        1. unclicked2.png
          unclicked2.png
          286 kB
        2. unclicked.png
          unclicked.png
          247 kB
        3. notyetclicked.png
          notyetclicked.png
          222 kB
        4. clicked2.png
          clicked2.png
          494 kB
        5. clicked.png
          clicked.png
          250 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 15 minutes
                  4h 15m