Bugzilla – Attachment 178780 Details for
Bug 39015
Date sorting not working in statistics wizards
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39015: Fix sorting by date on cash register statistics page
Bug-39015-Fix-sorting-by-date-on-cash-register-sta.patch (text/plain), 3.51 KB, created by
Baptiste Wojtkowski (bwoj)
on 2025-02-27 11:02:50 UTC
(
hide
)
Description:
Bug 39015: Fix sorting by date on cash register statistics page
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2025-02-27 11:02:50 UTC
Size:
3.51 KB
patch
obsolete
>From 6cbc880f7d1a27c31fe5cfc8e70b1cc69b7b65e5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 3 Feb 2025 13:40:15 +0000 >Subject: [PATCH] Bug 39015: Fix sorting by date on cash register statistics > page > >This patch adds a "data-sort" attribute to the columns in the results >table which contain dates. This allows DataTables to sort using the >unformatted date. > >The patch also adds the "anti-the" class to the column containing >titles, ensuring that the sort excludes articles. > >To test, apply the patch and go to Reports -> Statistics wizards -> Cash >register. You must have multiple entries in the results, which could be >generated by using the "Create manual invoice" form under a patron's >account tab. Unfortunately that won't create entries with multiple dates >to sort on. I assume a proper test will require some manual SQL updates. > >To test title sorting you should have some transactions which are tied >to an item. To generate this data: > >- Set the 'WhenLostChargeReplacementFee' system preference to "Charge" >- Add a replacement cost to some items in the catalog. >- Check those items out ot a patron. >- From the "Item details" tab for those records, mark each item lost. > - The charges should now be on the patron's account. > >- On the Cash register statistics page, submit the form using parameters > which will return multiple results. >- Test that the "Transaction date" and "Updated" columns work correctly > with various settings of the "dateformat" system preference. >- Test that the "Bibliographic record title" column sorts correctly, > excluding initial articles (a, an, the) from the sort. > >Sponsored-by: Athens County Public Libraries >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >--- > .../prog/en/modules/reports/cash_register_stats.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >index 6c379270..2ee3a5b9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt >@@ -163,7 +163,7 @@ > <th>Transaction type</th> > <th>Notes</th> > <th>Amount</th> >- <th>Bibliographic record title</th> >+ <th class="anti-the">Bibliographic record title</th> > <th>Barcode</th> > <th>Item type</th> > </tr> >@@ -174,8 +174,8 @@ > <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td> > <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td> > <td>[% loopresul.branchname | html %]</td> >- <td>[% loopresul.date | $KohaDates %]</td> >- <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td> >+ <td data-order="[% loopresul.date | html %]">[% loopresul.date | $KohaDates %]</td> >+ <td data-order="[% loopresul.timestamp | html %]">[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td> > <td>[% loopresul.type_description | html %]</td> > <td>[% loopresul.note | html %]</td> > <td style="text-align:right;">[% loopresul.amount | $Price %]</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 39015
:
177469
|
177470
|
177662
|
178770
| 178780