To recreate: - create a bib - add three items with source of classification LCC, call numbers: -- JC43 .G6 1890 -- JC330 .F74 2000 -- JC480 .R63 2006 - on additem.pl, sort the items table by "Full call number" - notice items are order incorrectly, going 330, 43, 480 - use a report to pull the cn_sort values for your 3 items, confirm that ordering by cn_sort in your report correctly orders them 43, 330, 480 We should use cn_sort here to get them in the correct order.
Andrew, could you test bug 25897 maybe? If that solution works well, we might be able to apply it in other places.
Happy to! It worked!
Thx, Andrew!
Created attachment 169336 [details] [review] Bug 26866: Sort items table on additem by cn_cort This patch changes the data-order attribute for the item callnumber column to use the item's cn_sort instead of the callnumber value. Test plan: 1. Create a bib 2. Add three items with source of classification LLC call numbers: JC43 .G6 1890 JC330 .F74 2000 JC480 .R63 2006 4. On additem.pl sor the items table by 'Full call number' 5. Confirm the items are now ordered correctly by cn_sort 6. Confirm the other columns still sort correctly
Created attachment 169381 [details] [review] Bug 26866: Sort items table on additem by cn_cort This patch changes the data-order attribute for the item callnumber column to use the item's cn_sort instead of the callnumber value. Test plan: 1. Create a bib 2. Add three items with source of classification LLC call numbers: JC43 .G6 1890 JC330 .F74 2000 JC480 .R63 2006 4. On additem.pl sor the items table by 'Full call number' 5. Confirm the items are now ordered correctly by cn_sort 6. Confirm the other columns still sort correctly Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Major bug, really ? :) Starting QA review
Created attachment 169419 [details] [review] Bug 26866: Sort items table on additem by cn_cort This patch changes the data-order attribute for the item callnumber column to use the item's cn_sort instead of the callnumber value. Test plan: 1. Create a bib 2. Add three items with source of classification LLC call numbers: JC43 .G6 1890 JC330 .F74 2000 JC480 .R63 2006 4. On additem.pl sor the items table by 'Full call number' 5. Confirm the items are now ordered correctly by cn_sort 6. Confirm the other columns still sort correctly Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(In reply to Julian Maurice from comment #6) > Major bug, really ? :) > Starting QA review majorly old :) Thanks Julian!
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Backported to 24.05.x for upcoming 24.05.04
In case items.cn_sort is empty we should falback to items.itemcallnumber no ? I prefer not backport to 23.11.x to be stable in behavior.