Bugzilla – Attachment 73296 Details for
Bug 20455
Can't sort patron search on date expired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20455: Fix sort patrons by date expired
Bug-20455-Fix-sort-patrons-by-date-expired.patch (text/plain), 1.55 KB, created by
Mark Tompsett
on 2018-03-26 22:41:50 UTC
(
hide
)
Description:
Bug 20455: Fix sort patrons by date expired
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-03-26 22:41:50 UTC
Size:
1.55 KB
patch
obsolete
>From ab34b154bf4b4721b4fe6cf3966ca84a374f5cb4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Mar 2018 13:13:58 -0300 >Subject: [PATCH] Bug 20455: Fix sort patrons by date expired > >We may need to apply this change for all other occurrences in our >codebase. > >Test plan: >- Make sure sample patron data is loaded and you have a patron without a >date expired defined >- Make an empty search for all patrons or another search that gives you >a good amount of results >- Try to sort on the date expired column > >=> Without this patch you get >Odd number of elements in anonymous hash >at /home/vagrant/kohaclone/C4/Utils/DataTables/Members.pm line 189. >output_pref is called with 'dateonly' (ref SCALAR), not a DateTime >object > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Utils/DataTables/Members.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index 8912146..1e3f642 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -186,7 +186,7 @@ sub search { > > if( $patron->{dateexpiry} ) { > # FIXME We should not format the date here, do it in template-side instead >- $patron->{dateexpiry} = output_pref( { dt => dt_from_string( $patron->{dateexpiry}, 'iso'), dateonly => 1} ); >+ $patron->{dateexpiry} = output_pref( { dt => scalar dt_from_string( $patron->{dateexpiry}, 'iso'), dateonly => 1} ); > } else { > $patron->{dateexpiry} = ''; > } >-- >2.1.4
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 20455
:
73287
|
73296
|
73358