Bugzilla – Attachment 138919 Details for
Bug 31331
OPAC suggestions table doesn't sort correctly by suggestiondate in some dateformats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31331: Add data-order attribute for better sorting of dates
Bug-31331-Add-data-order-attribute-for-better-sort.patch (text/plain), 1.90 KB, created by
Lucas Gass
on 2022-08-09 14:33:51 UTC
(
hide
)
Description:
Bug 31331: Add data-order attribute for better sorting of dates
Filename:
MIME Type:
Creator:
Lucas Gass
Created:
2022-08-09 14:33:51 UTC
Size:
1.90 KB
patch
obsolete
>From 56e4f590fbbb2946736d059004f27c65c408854f Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 9 Aug 2022 14:31:05 +0000 >Subject: [PATCH] Bug 31331: Add data-order attribute for better sorting of > dates > >To test: >1. I used the following suggestiondates: > >MariaDB [koha_kohadev]> select suggesteddate from suggestions; >+---------------+ >| suggesteddate | >+---------------+ >| 2022-01-03 | >| 2022-08-09 | >| 2022-02-22 | >| 2021-01-21 | >+---------------+ > >2. Set the dateformat system preference to 'mm/dd/yyyy'. >3. Try sorting the suggestion table by date, ascending and descending, it is not right. >4. Apply patch >5. Try sorting by date again, ascending and descending, it should now sort correctly. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >index cdc7927a5c..a292896420 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt >@@ -409,7 +409,7 @@ > [% IF ( suggestion.itemtype ) %] - [% AuthorisedValues.GetByCode( 'SUGGEST_FORMAT', suggestion.itemtype, 1 ) | html %][% END %] > </p> > </td> >- <td> >+ <td data-order="[% suggestion.suggesteddate | html %]"> > [% IF ( suggestion.suggesteddate ) %][% suggestion.suggesteddate |$KohaDates %][% END %] > </td> > <td> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31331
:
138919
|
138924
|
139051