Bug 18557

Summary: Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: katrin.fischer
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12461    
Bug Blocks:    
Attachments: Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
[SIGNED-OFF] Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Bug 18557 [QA Followup] - Use dt_from_string
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Bug 18557 [QA Followup] - Use dt_from_string

Description Jonathan Druart 2017-05-08 18:09:04 UTC

    
Comment 1 Kyle M Hall 2017-05-09 12:02:31 UTC
Created attachment 63281 [details] [review]
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Clubs.t
Comment 2 Josef Moravec 2017-05-09 12:50:43 UTC
Created attachment 63285 [details] [review]
[SIGNED-OFF] Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Clubs.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 3 Jonathan Druart 2017-05-09 13:16:34 UTC
Kyle, my understanding is that the best would be to use dt_from_string:

my $dtf = Koha::Database->new->schema->storage->datetime_parser;
then
  ->search({ date_end => { '>=' => $dtf->format_datetime( dt_from_string() ) } })

Do not you think?
Comment 4 Kyle M Hall 2017-05-09 14:15:33 UTC
(In reply to Jonathan Druart from comment #3)
> Kyle, my understanding is that the best would be to use dt_from_string:
> 
> my $dtf = Koha::Database->new->schema->storage->datetime_parser;
> then
>   ->search({ date_end => { '>=' => $dtf->format_datetime( dt_from_string() )
> } })
> 
> Do not you think?

That works for me! Followup incoming!
Comment 5 Kyle M Hall 2017-05-09 14:16:28 UTC
Created attachment 63290 [details] [review]
Bug 18557 [QA Followup] - Use dt_from_string
Comment 6 Jonathan Druart 2017-05-09 17:48:49 UTC
Created attachment 63305 [details] [review]
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable

Test Plan:
1) Apply this patch
2) prove t/db_dependent/Clubs.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2017-05-09 17:48:53 UTC
Created attachment 63306 [details] [review]
Bug 18557 [QA Followup] - Use dt_from_string

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall 2017-05-12 12:53:35 UTC
Pushed to master for 17.05!
Comment 9 Katrin Fischer 2017-05-14 09:54:50 UTC
Depends on bug 12461 which is not part of 16.11.x.