Bug 31496 - SCO slip uses data of patron's home library instead of the SCO staff users's library
Summary: SCO slip uses data of patron's home library instead of the SCO staff users's ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Lari Strand
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-31 12:05 UTC by Lari Strand
Modified: 2023-06-08 22:28 UTC (History)
3 users (show)

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


Attachments
use staff id:s branch for sco printslip (889 bytes, patch)
2022-08-31 12:51 UTC, Lari Strand
Details | Diff | Splinter Review
Bug 31496: Fix branch in printslip.pl to signed in staff id's branch (889 bytes, patch)
2022-09-01 06:48 UTC, Lari Strand
Details | Diff | Splinter Review
Bug 31496: Fix branch in printslip.pl to logged in staff user's library (1.65 KB, patch)
2022-09-07 09:52 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31496: Fix branch in printslip.pl to logged in staff user's library (1.70 KB, patch)
2022-09-23 18:39 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Strand 2022-08-31 12:05:21 UTC
When you print a receipt slip in SCO, the library/branch you are at in should be fetched from the logged in staff member's data (staff login done before entering SCO view) instead of the patron's own who has signed in to the SCO. Printing a slip shows patron's own home branch in the slip as the branch they're in. This causes confusion with patrons who want to print receipts/slips.
Comment 1 Lari Strand 2022-08-31 12:51:11 UTC
Created attachment 140003 [details] [review]
use staff id:s branch for sco printslip

To test:
Make sure the staff id's branch (used to login into SCO patron view) is not the same as the patron's who is logging into SCO.
Print a slip in SCO and notice patron's own branch in the slip.
Add patch.
Print a slip and notice the branch is now the staff id:s branch used to sign in to SCO patron view.
Comment 2 Lari Strand 2022-09-01 06:48:33 UTC
Created attachment 140031 [details] [review]
Bug 31496: Fix branch in printslip.pl to signed in staff id's branch

Test plan:
1) Make sure the staff id's branch (used to login into SCO patron view) is not the same as the patron's who is logging into SCO
2) Print a slip in SCO and notice patron's own branch printed in the slip
3) Apply patch
4) Print a slip in SCO and notice the branch is now the staff id's branch used to sign in to SCO patron view.
Comment 3 Lucas Gass (lukeg) 2022-09-02 14:24:49 UTC
Lari,

IS the idea here to print the branch specific slip of the AutoSelfCheck user?
Comment 4 Lari Strand 2022-09-05 11:47:45 UTC
(In reply to Lucas Gass from comment #3)
> Lari,
> 
> IS the idea here to print the branch specific slip of the AutoSelfCheck user?

The SCO uses the default issue slip in my case. Of course same applies for branch specific slips too. Without the patch the code is sending the logged in patron's branch to the function that generates the slip.
Comment 5 Katrin Fischer 2022-09-07 09:33:40 UTC
(In reply to Lucas Gass from comment #3)
> Lari,
> 
> IS the idea here to print the branch specific slip of the AutoSelfCheck user?

I think if set, yes, but it should use the home library of the logged in staff user actually. That could match AutoSelfCheck.
Comment 6 Katrin Fischer 2022-09-07 09:37:21 UTC
Hi Lari, 

thx for your patch!

I see that your commit message is missing the description and test plan  see in comment#1. Please note that when using git bz you can type things into the message when doing git bz attach, but it won't update the commit message. Use git commit --amend before uploading instead.

Now to test...
Comment 7 Katrin Fischer 2022-09-07 09:52:37 UTC
Created attachment 140267 [details] [review]
Bug 31496: Fix branch in printslip.pl to logged in staff user's library

When you print a receipt slip in SCO, the library/branch you are at
in should be fetched from the logged in staff member's data (staff login
done before entering SCO view) instead of the patron's own who has signed
in to the SCO. Printing a slip shows patron's own home branch in the slip
as the branch they're in. This causes confusion with patrons who want to
print receipts/slips.

Test plan:
1) Make sure the staff user's library (used to login into SCO patron
   view) is not the same as the patron's who is logging into SCO
2) Print a slip in SCO and notice patron's home library printed on the slip
3) Apply patch
4) Print a slip in SCO and notice the library is now the staff user's library
   used to sign in to SCO patron view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Joonas Kylmälä 2022-09-07 17:34:31 UTC
Change looks good however the author information is incomplete: lmstrand <lmstrand@gmail.com>. This will come handy when trying to figure out copyright holders of Koha if there is ever any issues. Could you re-attach the patch with your real name?
Comment 9 Kyle M Hall (khall) 2022-09-23 18:39:17 UTC
Created attachment 140961 [details] [review]
Bug 31496: Fix branch in printslip.pl to logged in staff user's library

When you print a receipt slip in SCO, the library/branch you are at
in should be fetched from the logged in staff member's data (staff login
done before entering SCO view) instead of the patron's own who has signed
in to the SCO. Printing a slip shows patron's own home branch in the slip
as the branch they're in. This causes confusion with patrons who want to
print receipts/slips.

Test plan:
1) Make sure the staff user's library (used to login into SCO patron
   view) is not the same as the patron's who is logging into SCO
2) Print a slip in SCO and notice patron's home library printed on the slip
3) Apply patch
4) Print a slip in SCO and notice the library is now the staff user's library
   used to sign in to SCO patron view.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Tomás Cohen Arazi (tcohen) 2022-09-26 13:54:42 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!