Bug 33010 - CheckinSlip doesn't return checkins if checkout library and checkin library differ
Summary: CheckinSlip doesn't return checkins if checkout library and checkin library d...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Emmi Takkinen
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 33641
  Show dependency treegraph
 
Reported: 2023-02-20 07:49 UTC by Emmi Takkinen
Modified: 2023-12-28 20:47 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.07


Attachments
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl (1.74 KB, patch)
2023-02-20 08:28 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl (1.80 KB, patch)
2023-04-24 22:40 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl (1.85 KB, patch)
2023-04-29 21:03 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2023-02-20 07:49:43 UTC
If one tries to print checkin slip for checkins that have been checked out from different branch, list of checkins is empty. One has to change their branch as checkout library to be able to print checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
Comment 1 Emmi Takkinen 2023-02-20 08:28:57 UTC
Created attachment 146943 [details] [review]
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl

If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Comment 2 Katrin Fischer 2023-02-20 09:27:15 UTC
Hm, I think the idea might have been to limit on the checkin library, as this is the library that will print on the slip. But I gather it's currently looking at the checkout library?
Comment 3 Emmi Takkinen 2023-02-21 09:07:20 UTC
(In reply to Katrin Fischer from comment #2)
> Hm, I think the idea might have been to limit on the checkin library, as
> this is the library that will print on the slip. But I gather it's currently
> looking at the checkout library?

Yes, it's using branch for logged in patron but looking at the checkout library. It seems this happens because (old_)reserves branchcode column is filled with info of the checkout library. If we had returnbranch column or something like that, we could search with it.
Comment 4 Lucas Gass 2023-04-24 22:40:55 UTC
Created attachment 150174 [details] [review]
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl

If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Nick Clemens 2023-04-29 21:03:44 UTC
Created attachment 150429 [details] [review]
Bug 33010: Do not filter checkins with logged in patrons branch in printslip.pl

If one tries to print checkin slip for checkins that
have been checked out from different branch, list
of checkins is empty. One has to change their branch
as checkout library to be able to print checkins.

This happens because we filter (or rather search) patrons
old checkouts with logged in patrons branch. This patch
removes this search so that checkout are filtered using
just filter_by_todays_checkins.

To test:
1. Checkout items for patron from branch A.
2. Switch to branch B and checkin items.
3. Print checkin slip.
=> Checkins list is empty.
4. Switch back to branch A.
5. Print checkin slip again.
=> Checkins are printed.
6. Apply this patch, restart services if needed.
7. Switch back to branch B and print checkin slip.
=> Checkins should now print.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-05-18 14:35:55 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2023-05-18 14:42:42 UTC
It would be very nice if this one could be backported into 22.11.
Comment 8 Matt Blenkinsop 2023-06-08 16:51:45 UTC
Nice work everyone!

Pushed to stable for 22.11.x