Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Summary: Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords:
Depends on: 12461
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-08 18:09 UTC by Jonathan Druart
Modified: 2017-12-07 22:17 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable (1.61 KB, patch)
2017-05-09 12:02 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable (1.68 KB, patch)
2017-05-09 12:50 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18557 [QA Followup] - Use dt_from_string (1.31 KB, patch)
2017-05-09 14:16 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 18557 - Mysqlim CURRENT_DATE in Koha::Clubs::get_enrollable (1.75 KB, patch)
2017-05-09 17:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18557 [QA Followup] - Use dt_from_string (1.39 KB, patch)
2017-05-09 17:48 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2017-05-08 18:09:04 UTC

    
Comment 1 Kyle M Hall (khall) 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 (khall) 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 (khall) 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 (khall) 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.