Bug 27851

Summary: Add Koha::Old::Checkouts->filter_by_todays_checkins method
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00
Bug Depends on: 12224    
Bug Blocks: 28896    
Attachments: Bug 27851: Add tests
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins
Bug 27851: Use filter_by_todays_checkins in printslip.pl
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins
Bug 27851: Use filter_by_todays_checkins in printslip.pl
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl
Bug 27851: Add tests
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins
Bug 27851: Use filter_by_todays_checkins in printslip.pl
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl
Bug 27851: Add tests
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins
Bug 27851: Use filter_by_todays_checkins in printslip.pl
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl

Description Jonathan Druart 2021-03-03 15:39:58 UTC
Bug 12224 is adding code in the controller to retrieve today's checkins.

There is already kind of the same code in members/readingrec.pl (op=export_barcodes).

We should provide a Koha::Old::Checkouts->filter_by_todays_checkins method, provide tests, and use it in both places.
Comment 1 Jonathan Druart 2021-03-05 10:47:07 UTC
Created attachment 117800 [details] [review]
Bug 27851: Add tests
Comment 2 Jonathan Druart 2021-03-05 10:47:10 UTC
Created attachment 117801 [details] [review]
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins

The logic for this code is handled at two different places (and in 2
different ways).
Better to centralize and provide tests
Comment 3 Jonathan Druart 2021-03-05 10:47:12 UTC
Created attachment 117802 [details] [review]
Bug 27851: Use filter_by_todays_checkins in printslip.pl

Test plan:
No regression from bug 12224 test plan
Comment 4 Jonathan Druart 2021-03-05 10:47:15 UTC
Created attachment 117803 [details] [review]
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl

Test plan:
Do some checkouts
Checkin with different return dates (several today however)
Check the circulation history and confirm that the checkout list is correct
Comment 5 Katrin Fischer 2021-03-05 11:42:13 UTC
Created attachment 117822 [details] [review]
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins

The logic for this code is handled at two different places (and in 2
different ways).
Better to centralize and provide tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2021-03-05 11:42:16 UTC
Created attachment 117823 [details] [review]
Bug 27851: Use filter_by_todays_checkins in printslip.pl

Test plan:
No regression from bug 12224 test plan

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-03-05 11:42:20 UTC
Created attachment 117824 [details] [review]
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl

Test plan:
Do some checkouts
Checkin with different return dates (several today however)
Check the circulation history and confirm that the checkout list is correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2021-03-05 11:45:00 UTC
Created attachment 117825 [details] [review]
Bug 27851: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Katrin Fischer 2021-03-05 11:45:04 UTC
Created attachment 117826 [details] [review]
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins

The logic for this code is handled at two different places (and in 2
different ways).
Better to centralize and provide tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Katrin Fischer 2021-03-05 11:45:07 UTC
Created attachment 117827 [details] [review]
Bug 27851: Use filter_by_todays_checkins in printslip.pl

Test plan:
No regression from bug 12224 test plan

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2021-03-05 11:45:11 UTC
Created attachment 117828 [details] [review]
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl

Test plan:
Do some checkouts
Checkin with different return dates (several today however)
Check the circulation history and confirm that the checkout list is correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 12 Katrin Fischer 2021-03-05 11:45:46 UTC
Tests pass, I checked the behaviour or the checkin slip, the reading history and also the behavior for the AnonymousPatron.
Comment 13 Martin Renvoize 2021-03-05 12:16:00 UTC
Created attachment 117836 [details] [review]
Bug 27851: Add tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 14 Martin Renvoize 2021-03-05 12:16:03 UTC
Created attachment 117837 [details] [review]
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins

The logic for this code is handled at two different places (and in 2
different ways).
Better to centralize and provide tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 15 Martin Renvoize 2021-03-05 12:16:06 UTC
Created attachment 117838 [details] [review]
Bug 27851: Use filter_by_todays_checkins in printslip.pl

Test plan:
No regression from bug 12224 test plan

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Martin Renvoize 2021-03-05 12:16:09 UTC
Created attachment 117839 [details] [review]
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl

Test plan:
Do some checkouts
Checkin with different return dates (several today however)
Check the circulation history and confirm that the checkout list is correct

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 17 Martin Renvoize 2021-03-05 12:16:31 UTC
Passing QA :)
Comment 18 Jonathan Druart 2021-03-05 12:52:19 UTC
Pushed to master for 21.05, thanks to everybody involved!