Bugzilla – Attachment 63306 Details for
Bug 18557
Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18557 [QA Followup] - Use dt_from_string
Bug-18557-QA-Followup---Use-dtfromstring.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2017-05-09 17:48:53 UTC
(
hide
)
Description:
Bug 18557 [QA Followup] - Use dt_from_string
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-05-09 17:48:53 UTC
Size:
1.39 KB
patch
obsolete
>From 5e1a5b3730ee880b6b42fe6e365113957c264c9c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 8 May 2017 21:23:22 +0000 >Subject: [PATCH] Bug 18557 [QA Followup] - Use dt_from_string > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Clubs.pm | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > >diff --git a/Koha/Clubs.pm b/Koha/Clubs.pm >index 677408df3a..eeaf4ef337 100644 >--- a/Koha/Clubs.pm >+++ b/Koha/Clubs.pm >@@ -22,6 +22,7 @@ use Modern::Perl; > use Carp; > > use Koha::Database; >+use Koha::DateUtils qw( dt_from_string ); > > use Koha::Club; > >@@ -56,10 +57,18 @@ sub get_enrollable { > } > } > >+ my $dtf = Koha::Database->new->schema->storage->datetime_parser; >+ > # Only clubs with no end date or an end date in the future can be enrolled in > $params->{'-and'} = [ >- -or => [ date_end => { '>=' => \'CAST(now() AS date)' }, date_end => undef], >- -or => [ 'me.branchcode' => $borrower->branchcode, 'me.branchcode' => undef ] >+ -or => [ >+ date_end => { '>=' => $dtf->format_datetime( dt_from_string() ) }, >+ date_end => undef, >+ ], >+ -or => [ >+ 'me.branchcode' => $borrower->branchcode, >+ 'me.branchcode' => undef, >+ ] > ]; > > my $rs = $self->_resultset()->search( $params, { prefetch => 'club_template' } ); >-- >2.11.0
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 18557
:
63281
|
63285
|
63290
|
63305
| 63306