Bug 25597

Summary: Javascript errors in self-checkout printslip.pl preventing printing
Product: Koha Reporter: David Cook <dcook>
Component: OPACAssignee: David Cook <dcook>
Status: RESOLVED FIXED QA Contact: Alex Arnaud <alex.arnaud>
Severity: normal    
Priority: P5 - low CC: aleisha, alex.arnaud, jonathan.druart+koha, lucas, victor
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25791
Change sponsored?: --- Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01, 19.11.07, 19.05.12
Bug Depends on: 14862, 20554    
Bug Blocks:    
Attachments: Bug 25597: Add missing Javascript libraries to sco printslip
Bug 25597: Add missing Javascript libraries to sco printslip
Bug 25597: Add missing Javascript libraries to sco printslip

Description David Cook 2020-05-25 06:09:37 UTC
Missing jquery in koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/printslip.tt means that the automatic slip printing and closing isn't working anymore. 

Patch to come soon.
Comment 1 David Cook 2020-05-25 06:28:15 UTC
Created attachment 105320 [details] [review]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen
Comment 2 Katrin Fischer 2020-05-25 20:50:57 UTC
Created attachment 105327 [details] [review]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Alex Arnaud 2020-06-05 12:47:02 UTC
Created attachment 105585 [details] [review]
Bug 25597: Add missing Javascript libraries to sco printslip

This patch adds missing Javascript libraries to the self-checkout
print slip. These missing libraries were preventing the auto print
prompt and close. There was also a font error.

To Test:
0) Apply patch
1) Turn on system preference SelfCheckReceiptPrompt
2) Check out item via /cgi-bin/koha/sco/sco-main.pl
3) Click "Finish"
4) Press F12 on keyboard and choose Console
5) Note no Javascript errors
6) Note that print dialog appears and closes after
a print option is chosen

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
Comment 4 Jonathan Druart 2020-06-15 10:00:34 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 5 Lucas Gass 2020-06-17 22:04:14 UTC
The errors are gone but the problem for me now is that I get two print dialog popups when I select "Print receipt and end session".

I will file a separate bug
Comment 6 Lucas Gass 2020-06-17 22:06:30 UTC
*** Bug 25785 has been marked as a duplicate of this bug. ***
Comment 7 Lucas Gass 2020-06-17 22:12:29 UTC
I opened bz25791 to address the double popups.
Comment 8 Lucas Gass 2020-06-17 22:13:12 UTC
backported to 20.05.x for 20.05.01
Comment 9 Aleisha Amohia 2020-06-19 03:32:32 UTC
backported to 19.11.x for 19.11.07
Comment 10 Victor Grousset/tuxayo 2020-06-19 04:10:45 UTC
Backported to 19.05.x branch for 19.05.12