[Bug 19021] New: inventory column not sortable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Bug ID: 19021 Summary: inventory column not sortable Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In inventory result page, items are shown in a JS DataTable. A column is not sortable for no reason. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 65413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65413&action=edit Bug 19021 - inventory column not sortable In inventory result page, items are shown in a JS DataTable. A column is not sortable for no reason. This patch removes code that sets column not sortable, maybe some changes in table made it obsolete. Test plan : - perform inventory - look at result table => Without patch second column is not sortable => With patch all columns are sortable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19022 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19023 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65413|0 |1 is obsolete| | --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 65417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65417&action=edit Bug 19021 - inventory column sorting In inventory result page, items are shown in a JS DataTable. For an inventory with barcode file second column is not sortable for no reason. For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. This patch corrects by setting default sort order on barcode column. Test plan : - perform inventory with barcode file - look at result table - table is sorted by barcode => Without patch second column is not sortable => With patch all columns are sortable - perform inventory without barcode file - look at result table => Without patch first column show sort icon and table is not sorted by barcode => With patch first column is not sortable and table is sorted by barcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Oh I see, this JS code is usefull for inventory without barcode file. I have correct patch and renamed bug a little -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|inventory column not |inventory column sorting |sortable | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65417|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 65424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=65424&action=edit [SIGNED-OFF] Bug 19021 - inventory column sorting In inventory result page, items are shown in a JS DataTable. For an inventory with barcode file second column is not sortable for no reason. For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. This patch corrects by setting default sort order on barcode column. Test plan : - perform inventory with barcode file - look at result table - table is sorted by barcode => Without patch second column is not sortable => With patch all columns are sortable - perform inventory without barcode file - look at result table => Without patch first column show sort icon and table is not sorted by barcode => With patch first column is not sortable and table is sorted by barcode Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Summary|inventory column sorting |Inventory column sorting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> ---
=> With patch first column is not sortable and table is sorted by barcode
When performing an inventory without a barcode file we are essentially generating a shelf list, shouldn't callnumber (or cn_sort ideally) be the default sort here? Even when comparing to a barcode file I think we should probably be sorting by callnumber in our results -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #6 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 67138 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67138&action=edit Bug 19021 - inventory column sorting In inventory result page, items are shown in a JS DataTable. For an inventory with barcode file second column is not sortable for no reason. For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. This patch corrects by setting default sort order on callnumber column. Test plan : - perform inventory with barcode file - look at result table - table is sorted by callnumber => Without patch second column is not sortable => With patch all columns are sortable - perform inventory without barcode file - look at result table => Without patch first column show sort icon and table is not sorted by callnumber => With patch first column is not sortable and table is sorted by callnumber -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #7 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Nick Clemens from comment #5)
=> With patch first column is not sortable and table is sorted by barcode
When performing an inventory without a barcode file we are essentially generating a shelf list, shouldn't callnumber (or cn_sort ideally) be the default sort here?
Even when comparing to a barcode file I think we should probably be sorting by callnumber in our results
Makes sens to me, I have pushed new patch. Using cn_sort is I think possible but needs some dev so it would be in another bug report. Regards ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #65424|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67138|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 67804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67804&action=edit Bug 19021 - inventory column sorting In inventory result page, items are shown in a JS DataTable. For an inventory with barcode file second column is not sortable for no reason. For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. This patch corrects by setting default sort order on callnumber column. Test plan : - perform inventory with barcode file - look at result table - table is sorted by callnumber => Without patch second column is not sortable => With patch all columns are sortable - perform inventory without barcode file - look at result table => Without patch first column show sort icon and table is not sorted by callnumber => With patch first column is not sortable and table is sorted by callnumber Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #67804|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 68715 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68715&action=edit Bug 19021 - inventory column sorting In inventory result page, items are shown in a JS DataTable. For an inventory with barcode file second column is not sortable for no reason. For an inventory without barcode file first column is not sortable but since it is the default sort order the sorting icon is still displayed. This patch corrects by setting default sort order on callnumber column. Test plan : - perform inventory with barcode file - look at result table - table is sorted by callnumber => Without patch second column is not sortable => With patch all columns are sortable - perform inventory without barcode file - look at result table => Without patch first column show sort icon and table is not sorted by callnumber => With patch first column is not sortable and table is sorted by callnumber Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Nick Clemens from comment #5)
=> With patch first column is not sortable and table is sorted by barcode
When performing an inventory without a barcode file we are essentially generating a shelf list, shouldn't callnumber (or cn_sort ideally) be the default sort here?
Even when comparing to a barcode file I think we should probably be sorting by callnumber in our results
Just found this problem in the wild, so I'm glad you piped up about call number last year, Nick! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Oh the "Export to CSV file" doesn't sort by call number though. I'll look at master to see if that's still an issue... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #12)
Oh the "Export to CSV file" doesn't sort by call number though. I'll look at master to see if that's still an issue...
OK it should be sorting using cn_sort as per commit 885c68e269419813dafde37fbeb32052e16974a1. I'll investigate more and stop spamming here... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- I need to do more investigation, but here's the relevant SQL query: SELECT items.itemnumber, barcode, itemcallnumber, items.cn_sort, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber, ccode FROM items LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber LEFT JOIN biblioitems on items.biblionumber = biblioitems.biblionumber WHERE ccode = ? AND items.homebranch = ? ORDER BY items.cn_sort, itemcallnumber, title I have different items with the same itemcallnumber values but different cn_sort values, so they get sorted into different parts of the list, which are completely not intuitive to the user. This patch's template fix remedies that on the user interface but not in the exported shelf list. I'm going to check into this more this afternoon... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- I'm not very familiar with this code, but I think this might actually be a data issue rather than a code issue. I had 2 items with near identical itemcallnumbers but very different cn_sort values: AL AH 616.951 SEX 2013 - 616_951000000000000_SEX_2013 AL AH 616.951 SEX 2010 - AL_AH_616_951000000000000_SEX_2010 I've just edited the first item in the staff client and it's changed 616_951000000000000_SEX_2013 to AL_AH_616_951000000000000_SEX_2013. I'm trying to find the code responsible for generating the cn_sort value, but I'm guessing that the code must have changed at some point, and the database upgrade script didn't re-run the cn_sort re-generation en masse, which is fair enough since that would be a big task for some libraries. I'm going to run touch_all_items.pl and see if it solves my problem without applying the patch on this bug report... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 --- Comment #16 from David Cook <dcook@prosentient.com.au> --- Running touch_all_items.pl did the trick. Now everything is sorting correctly by cn_sort even without this patch. I'll open up a separate bugzilla issue regarding this... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19021 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21447 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org