Uploaded image for project: 'UX Product'
  1. UX Product
  2. UXPROD-2695

Display Rounded Result Counts in Apps Using SearchAndSort (Inventory and Requests)

    XMLWordPrintable

    Details

    • Template:
      UXPROD features
    • Front End Estimate:
      Small < 3 days
    • Back End Estimate:
      Small < 3 days
    • Estimation Notes and Assumptions:
      Hide
      BE: All the logic is handled by RMB, CF team will only migrate to the proper version of the RMB and update interface versions.

      FE: I am hopeful that this will simply be a matter of reading one or two new properties in the result set and changing the wording in the translation but I'm not sure how easy/onerous it will be to thread a new isEstimate property all the up through all the layers or if we simply apply that logic at the very top layer based on the size of the record set :/
      Show
      BE: All the logic is handled by RMB, CF team will only migrate to the proper version of the RMB and update interface versions. FE: I am hopeful that this will simply be a matter of reading one or two new properties in the result set and changing the wording in the translation but I'm not sure how easy/onerous it will be to thread a new isEstimate property all the up through all the layers or if we simply apply that logic at the very top layer based on the size of the record set :/
    • Development Team:
      Prokopovych
    • Calculated Total Rank:
      28
    • PO Rank:
      97
    • PO Ranking Note:
      Hide
      2020-10-05: Setting high PO rank, as this is necessary to complete the work Core Platform has started in UXPROD-2623
      Show
      2020-10-05: Setting high PO rank, as this is necessary to complete the work Core Platform has started in UXPROD-2623
    • Rank: Chicago (MVP Sum 2020):
      R2
    • Rank: Cornell (Full Sum 2021):
      R1
    • Rank: 5Colleges (Full Jul 2021):
      R2
    • Rank: GBV (MVP Sum 2020):
      R3
    • Rank: TAMU (MVP Jan 2021):
      R2

      Description

      Purpose: The scope of this work is to display the rounded result counts in "core" apps using the SearchAndSort component (i.e. Inventory and Requests). Other apps that use SearchAndSort (e.g. Courses, Licenses and Agreements etc) will be able to make use of the work done in the component BUT they will need to their own RMB upgrades first.

      A separate feature will be created for apps using the SearchAndSortQuery component: UXPROD-2702

      This work will be done by Core Functional after Core Platform has developed the infrastructure as part of UXPROD-2623

      Description of work:

      The totalRecords search result hit count number returned by RMB is precise if totalRecords is below 1000 and it is only an estimation if totalRecords >= 1000 (details).
      The front-end currently displays "8081 records found" for estimations.
      This is misleading (false precision).

      "about" should be prepended for >= 1000.

      The number should be rounded for >= 1000.

      Algorithm for the front-end:

      if totalRecordsEstimated is true
        print "about " + totalRecordsRounded
      else if totalRecordsEstimated is false
        print totalRecords
      // totalRecordsEstimated is undefined until all back-ends have upgraded RMB,
      // handle this gracefully for folio-testing:
      else if totalRecords < 1000
        print totalRecords
      else
        print "about " + totalRecords + " (upgrade back-end for rounding)"
      

      Story outline:

      • Upgrade Inventory to RMB containing fix
      • Upgrade Requests to RMB contsining fix
      • Display rounded result counts in SearchAndSort

      Scenarios:

      1. Scenario
        • Given a result count is estimated (current understanding is that result counts above 1,000 are estimates)
        • When displayed in FOLIO
        • Then:
          • Result count should be preceded by "about"
          • Result count should be rounded using the "Rounded to first digit" method
          • For example:
            • Estimated result count from Postgres = 32351
            • Displays in FOLIO as "about 30,000 records found"
      2. Scenario
        • Given a result count is NOT estimated (current understanding is that result counts under 1,000 are exact)
        • When displayed in FOLIO
        • Then:
          • Result count should NOT be preceded by "about"
          • Result count should NOT be rounded
          • For example:
            • Exact result count from Postgres = 845
            • Displays in FOLIO as "845 records found"

      Story outline:

      • Upgrade Core modules using SearchAnndSortQuery to latest RMB
      • Display rounded result counts in SearchAndSortQuery

      Background Discussion:

      • Three rounding proposals were considered
      • Option B, "Round to first digit" was selected

      Details on Rounding Options Considered:

      3 rounding proposals are in the comments of MODINVSTOR-468:

      A) Round to magnitude:

      about 10,000 (3,000-29,999)
      about 100,000 (30,000-299,999)
      about 1,000,000 (300,000-2,999,999)
      about 10,000,000 (3,000,000-29,999,999)

      B) Round to first digit:

      about 2,000 (1,500-2,499)
      about 3,000 (2,500-3,499)
      about 4,000 (3,500-4,499)
      about 5,000 (4,500-5,499)
      about 6,000 (5,500-6,499)
      about 7,000 (6,500-7,499)
      about 8,000 (7,500-8,499)
      about 9,000 (8,500-9,499)
      about 10,000 (9,500-14,999)
      about 20,000 (15,000-24,999)
      about 30,000 (25,000-34,999)

      C) Round first digit to 1, 2 or 5:

      about 2,000 (1,500-3,999)
      about 5,000 (4,000-7,999)
      about 10,000 (8,000-14,999)
      about 20,000 (15,000-39,999)
      about 50,000 (40,000-79,999)

      This issue is about deciding whether there should be a FOLIO standard for rounding, and if yes, which to choose, and whether the front-end or the back-end should round the number.

      Proposed API as of July 28, 2020

      If the back-end rounds it should also provide to original (non-rounded) estimate, for example

      totalRecords: 1431
      totalRecordsRounded: 1000
      totalRecordsEstimated: true
      

      No rounding is needed for an exact number:

      totalRecords: 1509
      totalRecordsEstimated: false
      

      https://github.com/folio-org/raml/blob/raml1.0/schemas/resultInfo.schema needs to be extended accordingly.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                cboerema Cate Boerema
                Reporter:
                cboerema Cate Boerema
                Front End Estimator:
                Zak_Burke Zak_Burke
                Back End Estimator:
                Bohdan Suprun Bohdan Suprun
                Votes:
                0 Vote for this issue
                Watchers:
                17 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases