[Bug 18728] New: use html filter in suggestions datatable sort
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Bug ID: 18728 Summary: use html filter in suggestions datatable sort Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In suggestions datatable one can sort on colums "Suggested by" or "Managed by". Those columns may contain HTML tags. Use datatable sorting type html to have a correct sorting. -- 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=18728 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 watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 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=18728 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63960&action=edit Bug 18728 - use html filter in suggestions datatable sort In suggestions datatable one can sort on colums "Suggested by" or "Managed by". Those columns may contain HTML tags. Use datatable sorting type html to have a correct sorting. Test plan : - Be sure to have some suggestions asked and managed - Go to Acquisitions > Suggestions - Click on "Suggested by" to sort => Table is sorted by the user name - Click on "Managed by" to sort => Table is sorted by the user name -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Josef Moravec <josef.moravec@gmail.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=18728 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63960|0 |1 is obsolete| | --- Comment #2 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 64018 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64018&action=edit [SIGNED-OFF] Bug 18728 - use html filter in suggestions datatable sort In suggestions datatable one can sort on colums "Suggested by" or "Managed by". Those columns may contain HTML tags. Use datatable sorting type html to have a correct sorting. Test plan : - Be sure to have some suggestions asked and managed - Go to Acquisitions > Suggestions - Click on "Suggested by" to sort => Table is sorted by the user name - Click on "Managed by" to sort => Table is sorted by the user name Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> ---
Those columns may contain HTML tags.
How? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- The user name in each column is a link: <td> <a href="mailto:oleonard@example.com">Smith, Dave (0123456)</a> - 09/08/2016 </td> ...so there is definitely HTML, but I don't find that it sorts incorrectly. Are there only certain circumstances which trigger a bug? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Owen Leonard from comment #4)
The user name in each column is a link:
<td> <a href="mailto:oleonard@example.com">Smith, Dave (0123456)</a> - 09/08/2016 </td>
...so there is definitely HTML, but I don't find that it sorts incorrectly. Are there only certain circumstances which trigger a bug?
Try with some users without email and some with email : Doe, John Smith, John <a href="mailto:jannesmith@example.com">Smith, Jane</a> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Sounds like it is already correctly sorted without the patch. Asking for another signoff. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I used the following script to generate the data: use Modern::Perl; use t::lib::TestBuilder; my $builder = t::lib::TestBuilder->new; my $type = 'Suggestion'; my $number = 100; if ( $type eq 'Suggestion' ) { for ( 1 .. $number ) { my $managed_by = $builder->build({ source => 'Borrower' }); my $suggested_by = $builder->build({ source => 'Borrower' }); $builder->build({ source => 'Suggestion', value => { STATUS => 'pending', managedby => $managed_by->{borrowernumber}, suggestedby => $suggested_by->{borrowernumber} } }); } } -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #6)
Sounds like it is already correctly sorted without the patch.
Asking for another signoff.
Indeed, I can't reproduce. Maybe something changed in DataTable JS. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Ah when it does not work, sort is on member email (that is inside href) instead of name. Even with all cells with html <a></a> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Fridolin SOMERS from comment #9)
Ah when it does not work, sort is on member email (that is inside href) instead of name. Even with all cells with html <a></a>
I can reproduce on 3.22. I can reproduce now on master : Suggested by : <a href="mailto:zzz@xxx.fr">DIFRON, Daniel (90519000019877)</a> <a href="mailto:aaa@xxx.fr">NAPISTE, Nicole (90519000014977)</a> It is well sorted : DIFRON than NAPISTE. If anyone can confirm I'll set has resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 --- Comment #11 from Owen Leonard <oleonard@myacpl.org> --- I still can't reproduce, even after remove some email addresses from patron records, adding different email addresses to identically-named patrons, etc. I think this is resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|In Discussion |RESOLVED --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Oki, thanks all for testing. I mark as resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18728 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |INVALID --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Next time please confirm the bug before fixing it ;) -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org