[Bug 27934] New: Using 'title' attributes on span fields for sorting is wrong
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Bug ID: 27934 Summary: Using 'title' attributes on span fields for sorting is wrong Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff Client Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com We have some interesting code in our datatables wrappers to magically sort on 'title' attributes found in spans in table fields (When the headings are marked up with 'title-string' and 'title-number' classes). This is weird and a mis-use of the HTML title attribute. It results in tooltips being generated for all fields witch such values and often those tooltips are confusing/mismatched. We should replace these with either data- attributes or perhaps use hidden datatables columns for sorting? Basically.. there must be a better way. -- 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=27934 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |oleonard@myacpl.org, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It must be data-order https://datatables.net/manual/data/orthogonal-data#HTML-5 We use it already in a few places. -- 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=27934 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=27926 -- 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=27934 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- That's a really useful page of documentation Jonathan, thanks for linking it :) -- 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=27934 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118182 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118182&action=edit Bug 27934: Update waiting_holds.inc to use data-order This patch updates the waiting_holds table to use data-order attributes on the "Waiting since" and "Date hold placed" fields. Test plan 1/ Prior to applying the patch navigate to a page that displays waiting holds 2/ Hover over the the "Waiting since" and "Date hold placed" data fields and note that you are faced with a tooltip with the iso formatted date. 3/ Apply the patch 4/ Check that sorting still works as expected for the two columns 5/ You should no longer be able to trigger the tooltip -- 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=27934 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Example patch.. there's allot of these to fix... -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- 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=27934 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Find more cases with a simple grep for 'title-string' in the templates directories -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118182|0 |1 is obsolete| | --- Comment #6 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 118206 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118206&action=edit Bug 27934: Update waiting_holds.inc to use data-order This patch updates the waiting_holds table to use data-order attributes on the "Waiting since" and "Date hold placed" fields. Test plan 1/ Prior to applying the patch navigate to a page that displays waiting holds 2/ Hover over the the "Waiting since" and "Date hold placed" data fields and note that you are faced with a tooltip with the iso formatted date. 3/ Apply the patch 4/ Check that sorting still works as expected for the two columns 5/ You should no longer be able to trigger the tooltip Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- 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=27934 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk --- Comment #7 from Sally <sally.healey@cheshiresharedservices.gov.uk> --- Sorry, I keep jumping too soon - who knew that signing off bugs was so exciting? ;) Happy to sign off again once it's ready for testing. -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Using 'title' attributes on |Table sorting using |span fields for sorting is |title-string option is |wrong |obsolete --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- I agree that we should update the templates to use the newer sorting option. I've updated the bug title to make it clear that it's about an obsolete option. -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27974 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27974 [Bug 27974] Replace obsolete title-string sorting: Circulation templates -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27975 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27975 [Bug 27975] Replace obsolete title-string sorting: Administration templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|27974 | Depends on|27975 |27974 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27974 [Bug 27974] Replace obsolete title-string sorting: Circulation templates https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27975 [Bug 27975] Replace obsolete title-string sorting: Administration templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27975 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27975 [Bug 27975] Replace obsolete title-string sorting: Administration templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27980 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27980 [Bug 27980] Replace obsolete title-string sorting: Catalog templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27982 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27982 [Bug 27982] Replace obsolete title-string sorting: Acquisitions templates part 1 -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27983 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27983 [Bug 27983] Replace obsolete title-string sorting: Acquisitions templates part 2 -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27990 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27990 [Bug 27990] Replace obsolete title-string sorting: Patrons -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27994 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27994 [Bug 27994] Replace obsolete title-string sorting: Reports templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27998 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27998 [Bug 27998] Replace obsolete title-string sorting: Serials templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28007 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28007 [Bug 28007] Replace obsolete title-string sorting: Tools templates -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28016 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28016 [Bug 28016] Replace obsolete title-string sorting: Assorted templates -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28018 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28018 [Bug 28018] Replace obsolete title-string sorting: OPAC templates -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Still a couple of occurrences in waiting_holds.inc then we are good to remove the functions in datatables.js -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Added a QA check https://gitlab.com/koha-community/qa-test-tools/-/issues/48 Issue #48 - Forbid title-string class for sorting -- 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=27934 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Recent push : Bug 27926: Add 'title-string' for dates on circ-patron-results Does it need to be patched ? -- 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=27934 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Fridolin Somers from comment #11)
Recent push : Bug 27926: Add 'title-string' for dates on circ-patron-results
Does it need to be patched ?
That already had a follow-up to fix it :) -- 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=27934 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like we sill got some remaining title-string attributes: koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc: { "targets": [ "title-string" ], "type": "title-string" }, koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt: <th class="recall-date title-string">Earliest recall date</th> koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt: { "sType": "title-string", "aTargets" : [ "title-string" ] }, koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt: <th class="recall-waitingdate title-string">Available since</th> koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt: <th class="recall-waitingdate title-string">Available since</th> -- 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=27934 --- Comment #14 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- columns_settings.inc is obviously correct The recall ones need to be adjusted. -- 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=27934 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=27934 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118206|0 |1 is obsolete| | --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 184921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184921&action=edit Bug 27934: Remove title-string to order by dates We must now use data-order to order dates, not title-string. This patch adjusts the few occurrences that were using it and remove the function from datatables.js to prevent new occurrences. Test plan: Create some recalls, go to the "Recalls to pull" and "Recalls awaiting pickup" pages and confirm that the dates are ordered correctly when you sort by dates. -- 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=27934 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | -- 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184921|0 |1 is obsolete| | --- Comment #16 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 184923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184923&action=edit Bug 27934: Remove title-string to order by dates We must now use data-order to order dates, not title-string. This patch adjusts the few occurrences that were using it and remove the function from datatables.js to prevent new occurrences. Test plan: Create some recalls, go to the "Recalls to pull" and "Recalls awaiting pickup" pages and confirm that the dates are ordered correctly when you sort by dates. 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=27934 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40589 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40589 [Bug 40589] Add table settings to recalls pages -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Paul Derscheid <paul.derscheid@lmscloud.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=27934 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184923|0 |1 is obsolete| | --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 186284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186284&action=edit Bug 27934: Remove title-string to order by dates We must now use data-order to order dates, not title-string. This patch adjusts the few occurrences that were using it and remove the function from datatables.js to prevent new occurrences. Test plan: Create some recalls, go to the "Recalls to pull" and "Recalls awaiting pickup" pages and confirm that the dates are ordered correctly when you sort by dates. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 --- Comment #18 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 --- Comment #19 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27934 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Enhancement not pushed to 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org