[Bug 29949] New: Remove use of title-numeric sorting routine from OPAC datatables JS
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 Bug ID: 29949 Summary: Remove use of title-numeric sorting routine from OPAC datatables JS Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org There is one template in the OPAC, opac-topissues.tt, which uses a special DataTables sorting routine called "title-numeric." This can be replaced with sorting via a data-order attribute, and the custom routine can be removed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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=29949 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 129824 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129824&action=edit Bug 29949: Remove use of title-numeric sorting routine from OPAC datatables JS This patch removes the use of a specific "title-numeric" sorting routine from the DataTables configuration of the "Most popular" table. We can use a "data-order" attribute instead. The patch also removes the now unused code from our custom DataTables JS file in both the OPAC and the staff interface (where it was unused). To test, apply the patch and make sure the OpacTopissue system preference is enabled. - In the OPAC, view the "Most popular" page. - Change the filter settings, if necessary, to get multiple results. - In the results table, confirm that sorting by number of checkouts still works correctly. A search of the code for instances of "title-numeric" should return only one in a comment in the official DataTables library. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 Lucas Gass <lucas@bywatersolutions.com> 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=29949 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129824|0 |1 is obsolete| | --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 129836 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129836&action=edit Bug 29949: Remove use of title-numeric sorting routine from OPAC datatables JS This patch removes the use of a specific "title-numeric" sorting routine from the DataTables configuration of the "Most popular" table. We can use a "data-order" attribute instead. The patch also removes the now unused code from our custom DataTables JS file in both the OPAC and the staff interface (where it was unused). To test, apply the patch and make sure the OpacTopissue system preference is enabled. - In the OPAC, view the "Most popular" page. - Change the filter settings, if necessary, to get multiple results. - In the results table, confirm that sorting by number of checkouts still works correctly. A search of the code for instances of "title-numeric" should return only one in a comment in the official DataTables library. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- before patch: root@kohadevbox:koha(master)$ git grep 'title-numeric' koha-tmpl/intranet-tmpl/lib/datatables/datatables.js: * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) { koha-tmpl/intranet-tmpl/prog/js/datatables.js: * { "sType": "title-numeric" }, koha-tmpl/intranet-tmpl/prog/js/datatables.js: "title-numeric-pre": function ( a ) { koha-tmpl/intranet-tmpl/prog/js/datatables.js: "title-numeric-asc": function ( a, b ) { koha-tmpl/intranet-tmpl/prog/js/datatables.js: "title-numeric-desc": function ( a, b ) { koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt: { "type": "title-numeric", "targets" : [ "title-num"] }, koha-tmpl/opac-tmpl/bootstrap/js/datatables.js: * { "sType": "title-numeric" }, koha-tmpl/opac-tmpl/bootstrap/js/datatables.js: "title-numeric-pre": function ( a ) { koha-tmpl/opac-tmpl/bootstrap/js/datatables.js: "title-numeric-asc": function ( a, b ) { koha-tmpl/opac-tmpl/bootstrap/js/datatables.js: "title-numeric-desc": function ( a, b ) { after patch: root@kohadevbox:koha(master)$ git grep 'title-numeric' koha-tmpl/intranet-tmpl/lib/datatables/datatables.js: * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) { -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129836|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 129972 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129972&action=edit Bug 29949: Remove use of title-numeric sorting routine from OPAC datatables JS This patch removes the use of a specific "title-numeric" sorting routine from the DataTables configuration of the "Most popular" table. We can use a "data-order" attribute instead. The patch also removes the now unused code from our custom DataTables JS file in both the OPAC and the staff interface (where it was unused). To test, apply the patch and make sure the OpacTopissue system preference is enabled. - In the OPAC, view the "Most popular" page. - Change the filter settings, if necessary, to get multiple results. - In the results table, confirm that sorting by number of checkouts still works correctly. A search of the code for instances of "title-numeric" should return only one in a comment in the official DataTables library. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> 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=29949 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=29949 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29949 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, 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=29949 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org