Bug 30045

Summary: SCO print slip is broken
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldoldoldstable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: critical    
Priority: P5 - low CC: andrewfh, kyle, m.de.rooy, victor, wainuiwitikapark
Version: unspecified   
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:
22.05.00,21.11.03,21.05.11,20.11.15,19.11.26
Bug Depends on: 29543, 29914    
Bug Blocks: 29960    
Attachments: Bug 30045: (bug 29543 follow-up) Fix SCO print slip
Bug 30045: (bug 29543 follow-up) Fix SCO print slip
Bug 30045: (bug 29543 follow-up) Fix SCO print slip

Description Jonathan Druart 2022-02-08 11:11:47 UTC
Certainly since bug 29543 and bug 29914.
Comment 1 Jonathan Druart 2022-02-08 11:14:57 UTC
Created attachment 130279 [details] [review]
Bug 30045: (bug 29543 follow-up) Fix SCO print slip

Certainly since bug 29543 and bug 29914.

We should do the same authentication check than sco-main.pl, and also
make sure to generate the checkout history only for the logged in patron
(the OPAC one, not staff member)

Test plan:
Use the different combinations of the SCO config (AutoSelfCheckAllowed,
SelfCheckoutByLogin and WebBasedSelfCheck) and confirm that this patch
fixes the SCO print slip feature.
Comment 2 Owen Leonard 2022-02-08 12:39:42 UTC
Created attachment 130282 [details] [review]
Bug 30045: (bug 29543 follow-up) Fix SCO print slip

Certainly since bug 29543 and bug 29914.

We should do the same authentication check than sco-main.pl, and also
make sure to generate the checkout history only for the logged in patron
(the OPAC one, not staff member)

Test plan:
Use the different combinations of the SCO config (AutoSelfCheckAllowed,
SelfCheckoutByLogin and WebBasedSelfCheck) and confirm that this patch
fixes the SCO print slip feature.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2022-02-08 12:44:54 UTC
QAing
Comment 4 Marcel de Rooy 2022-02-08 14:51:59 UTC
Created attachment 130292 [details] [review]
Bug 30045: (bug 29543 follow-up) Fix SCO print slip

Certainly since bug 29543 and bug 29914.

We should do the same authentication check than sco-main.pl, and also
make sure to generate the checkout history only for the logged in patron
(the OPAC one, not staff member)

Test plan:
Use the different combinations of the SCO config (AutoSelfCheckAllowed,
SelfCheckoutByLogin and WebBasedSelfCheck) and confirm that this patch
fixes the SCO print slip feature.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Marcel de Rooy 2022-02-08 14:54:57 UTC
The code in sco-main and printslip does not really convince me, but it seems to work. Passing QA to allow for a quick fix.

Posted comments too on 29543.
Comment 6 Fridolin Somers 2022-02-10 01:36:57 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-02-11 11:20:40 UTC
Pushed to 21.11.x for 21.11.03
Comment 8 Andrew Fuerste-Henry 2022-02-21 14:21:11 UTC
Pushed to 21.05.x for 21.05.11
Comment 9 Victor Grousset/tuxayo 2022-02-23 23:48:10 UTC
Backported: Pushed to 20.11.x branch for 20.11.15
Comment 10 Victor Grousset/tuxayo 2022-02-23 23:58:53 UTC
testing note: the bug is that if asks for relogin before printing the slip
Comment 11 wainuiwitikapark 2022-03-21 00:09:05 UTC
This was pushed to 19.11.x for 19.11.26