Sorting on the Instance's Holdings item table is not working, part 2 (Poppy Clone)
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
clones
continues
defines
is duplicated by
relates to
Checklist
hideTestRail: Results
Activity
Zak BurkeOctober 16, 2023 at 8:27 PM
Ooh, I see the problem now, : previously, items were retrieved in one fell swoop in displayed in a single MCL; thus, we could handle sorting in the UI. Now items are retrieved in batches and displayed in multiple pages; thus, sorting must happen on the backend in order for batching to work. I understand.
Still, it seems unfortunate that the use case of "thousands of items, the backend picks the sort algorithm" must trump the use case of "a few hundred items, the user picks the sort algorithm". Would it be possible to restore UI-sort at least for lists where all items are retrieved in a single batch? Is it worth exploring if all items could be loaded into the UI, even if they are retrieved in batches and displayed in pages? (i.e. the UI shows a spinner while it loads batch-1, batch-2, ... batch-n into a single array of records; the UI replaces the spinner with an MCL with 100 records; the user clicks a column header to re-sort the records, which we can do with my silly, expensive sort algorithm because it's all happening client side against a few hundred/few thousand item records). What do you think, ?
Do we have any examples of holdings with so many items that retrieving them all (though not displaying them all) would actually be problematic? Do you have a sense of the upper bound here, ?

Mariia AloshynaOctober 16, 2023 at 2:10 PM
Hi The sorting is happening on BE now, I don't think we can apply this algorithm you mentioned
Zak BurkeOctober 14, 2023 at 3:25 AM
, The sort algorithm I wrote pulls up to three numeric values out of a string in order to compare values like an item's enumeration, copy number, or volume where we may have values like v.10:no.7-12
and we want to pluck out the 10, 7, and 12 and sort them numerically, e.g. so it comes after a value like v.2:no.7-12
that it would precede alphabetically. There are many examples in the accompanying test.
I haven't looked carefully at what's happening here. Is it possibly as simple as "we need to lift this algorithm up a level and apply it to some holidings-record fields in addition to the item fields where it is currently applied"?

Ann-Marie BreauxOctober 12, 2023 at 2:54 PM
Re-closed. Add new bug if necessary, but AFAIK, unless we hear differently from Zak, sorting is working as well as it can

Ann-Marie BreauxOctober 11, 2023 at 8:22 AM
Hi My understanding is that many of these "number" fields are actually text fields in the schema, since a library might represent a volume number as:
v. 24
vol. 24
24
Bd. 24
Bd. 24: T.1
v. 24:pt. 1
Etc
And since the field can contain a mixture of alpha and numeric characters, there's not really a way to cleanly sort it numerically. Is there's a way to do it, we would of course love to know that, so any details that can point us to would be great. cc:
Reminder for A-M: this bugfix was closed, but then reopened last week after comment from Thomas
Details
Assignee
Ann-Marie BreauxAnn-Marie Breaux(Deactivated)Reporter
Ann-Marie BreauxAnn-Marie Breaux(Deactivated)Priority
P1Story Points
0Sprint
NoneDevelopment Team
FolijetParent
Fix versions
Release
Poppy (R2 2023)RCA Group
Data related (ex. Can be detected with large dataset only)Affected releases
Poppy (R2 2023)Orchid (R1 2023)Affected Institution
!!!ALL!!!TestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee

Reporter

Clones Orchid CSP 6 on UIIN-2565
Overview:
Sorting on the item table is not working when there is more than 1 page of items (200+ items)
(formerly MODINV-867)
Steps to Reproduce:
Create field mapping profile and action profile for creating items
Material type: 945$b
Copy number: 945$c
Permanent loan type: pick a value
Status: pick a value
Create field mapping profile and action profile for creating holdings
Permanent location: 945$a
Create job profile
Action: Default create instance and SRS MARC
Action: Create holdings
Action: Create items
Import the attached file, which will create 1 instance, 1 holdings, and 351 items
Use that item list to check sorting
Expected Results: Items sort from 1-200 on first page, then 201-351, for any column header that is picked (using the copy number column is easiest)
Actual Results: Items sort by column header, but only appear to sort within the page of items, not across pages
Additional Information:
Job profile on Orchid Bugfest: https://bugfest-orchid.int.aws.folio.org/settings/data-import/job-profiles/view/6f368782-bc22-49a8-bbad-484815e36cf5?sort=name BUT cannot import the attached file to Orchid BF and create 351 items, since Orchid does not support multiples...
Interested parties:
ORCHID Critical service patch details
Describe issue impact on business: Fixes the second part of a regression that was introduced in an earlier Orchid CSP (by a different dev team) where sorting in the item record table under the holdings, in the instance detail record, stopped working. When there are large numbers of item records associated with a holdings, the lack of sorting makes it difficult for production libraries to identify specific item records that need attention. The first fix on UIIN-2528, fixed sorting within a page of items (200 items). This Jira fixes the sorting across all pages of items under a holdings
What institutions are affected? (field “Affected Institutions” in Jira to be populated) - All that have large numbers of item records associated with specific items
What is the workaround if exists? No user workaround, other than paging through many, many pages of item records, which is very time-consuming
What areas will be impacted by fix (i.e. what areas need to be retested) Inventory Smoke and Critical Path automated tests, plus the specific manual test associated with this Jira
Brief explanation of technical implementation and the level of effort (in workdays) and technical risk (low/medium/high).
Work is complete and the level of effort was minimal, though disruptive to have to attend to this unexpected regression.
Use sorted records array instead of initial items prop
Risk to backport: Minimal
Brief explanation of testing required and level of effort (in workdays). Provide test plan agreed with by QA Manager and PO. Automated and manual test cases already exist and level of effort is 1 hour
What is the roll back plan in case the fix does not work? Revert to previous version