Bugzilla – Attachment 63281 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 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Bug-18557---Mysqlim-CURRENTDATE-in-KohaClubsgetenr.patch (text/plain), 1.61 KB, created by
Kyle M Hall (khall)
on 2017-05-09 12:02:31 UTC
(
hide
)
Description:
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-05-09 12:02:31 UTC
Size:
1.61 KB
patch
obsolete
>From 6bee28925a7ac9cf7fe588ec2912ca59802c4dd0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 9 May 2017 07:56:53 -0400 >Subject: [PATCH] Bug 18557 - Mysqlim CURRENT_DATE in > Koha::Clubs::get_enrollable > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/Clubs.t >--- > Koha/Clubs.pm | 2 +- > t/db_dependent/Clubs.t | 10 ++++++++++ > 2 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/Koha/Clubs.pm b/Koha/Clubs.pm >index 7d62d22..677408d 100644 >--- a/Koha/Clubs.pm >+++ b/Koha/Clubs.pm >@@ -58,7 +58,7 @@ sub get_enrollable { > > # Only clubs with no end date or an end date in the future can be enrolled in > $params->{'-and'} = [ >- -or => [ date_end => { '>=' => \'CURRENT_DATE()' }, date_end => undef], >+ -or => [ date_end => { '>=' => \'CAST(now() AS date)' }, date_end => undef], > -or => [ 'me.branchcode' => $borrower->branchcode, 'me.branchcode' => undef ] > ]; > >diff --git a/t/db_dependent/Clubs.t b/t/db_dependent/Clubs.t >index ed426f9..ab39a6d 100755 >--- a/t/db_dependent/Clubs.t >+++ b/t/db_dependent/Clubs.t >@@ -124,6 +124,16 @@ is( $club_template->club_template_enrollment_fields->count, > 2, 'Club template has two enrollment fields' ); > > ## Create a club based on this template >+Koha::Club->new( >+ { >+ club_template_id => $club_template->id, >+ name => "Test Expired Club", >+ branchcode => $branchcode, >+ date_start => '1900-01-01', >+ date_end => '1900-01-02', >+ } >+)->store(); >+ > my $club = Koha::Club->new( > { > club_template_id => $club_template->id, >-- >2.10.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 18557
:
63281
|
63285
|
63290
|
63305
|
63306