Bug 27851 - Add Koha::Old::Checkouts->filter_by_todays_checkins method
Summary: Add Koha::Old::Checkouts->filter_by_todays_checkins method
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 12224
Blocks: 28896
  Show dependency treegraph
 
Reported: 2021-03-03 15:39 UTC by Jonathan Druart
Modified: 2021-08-25 11:00 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 27851: Add tests (3.02 KB, patch)
2021-03-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins (1.42 KB, patch)
2021-03-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in printslip.pl (1.64 KB, patch)
2021-03-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl (2.64 KB, patch)
2021-03-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins (1.48 KB, patch)
2021-03-05 11:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in printslip.pl (1.70 KB, patch)
2021-03-05 11:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl (2.69 KB, patch)
2021-03-05 11:42 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Add tests (3.08 KB, patch)
2021-03-05 11:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins (1.48 KB, patch)
2021-03-05 11:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in printslip.pl (1.70 KB, patch)
2021-03-05 11:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl (2.69 KB, patch)
2021-03-05 11:45 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27851: Add tests (3.14 KB, patch)
2021-03-05 12:16 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27851: Add Koha::Old::Checkouts->filter_by_todays_checkins (1.54 KB, patch)
2021-03-05 12:16 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in printslip.pl (1.76 KB, patch)
2021-03-05 12:16 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27851: Use filter_by_todays_checkins in members/readingrec.pl (2.76 KB, patch)
2021-03-05 12:16 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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!