[Bug 40108] New: Self-checkout print receipt option not working
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Bug ID: 40108 Summary: Self-checkout print receipt option not working Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Self checkout Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org In self-checkout, if I try to end my session by clicking the "Finish" button I get the "Would you like to print a receipt?" prompt but clicking the "Print receipt and end session" button doesn't trigger a new page with the receipt. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183125 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183125&action=edit Bug 40108: Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183125|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 183128 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183128&action=edit Bug 40108: Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=11498 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 David Flater <flaterdavid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183128|0 |1 is obsolete| | --- Comment #3 from David Flater <flaterdavid@gmail.com> --- Created attachment 183139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183139&action=edit Bug 40108: Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries Signed-off-by: David Flater <flaterdavid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- *** Bug 40102 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 David Flater <flaterdavid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |flaterdavid@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- *** Bug 40158 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183139|0 |1 is obsolete| | --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 183342 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183342&action=edit Bug 40108: Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries Signed-off-by: David Flater <flaterdavid@gmail.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | --- Comment #7 from Brendan Lawlor <blawlor@clamsnet.org> --- This patch works as described and removing the obsolete code makes sense. Nice work. Thanks for the detailed test plan. Passing QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #8 from Brendan Lawlor <blawlor@clamsnet.org> --- In the meantime until this gets backported, assuming you have SelfCheckReceiptPrompt enabled you can add this js snippet to SCOUserJS to override the finish button's click handler: $(document).ready(function() { $("#logout_form").off("click"); $("#logout_form").on("click", function(e){ e.preventDefault(e); confirmModal("", _("Would you like to print a receipt?"), _("Print receipt and end session"), _("End session"), function(result) { if ( result ) { var win = window.open("/cgi-bin/koha/sco/printslip.pl?print=qslip"); location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; } else { location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout'; } }); return true; }); }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #9 from David Cook <dcook@prosentient.com.au> --- Extra +1 from me. I ended up writing the same patch as Owen a week later 😅. Guess the title of bug 40158 was just different enough not to show as a duplicate at report time I imagine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.01 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #11 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x for 25.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #12 from Christopher Brannon <cbrannon@cdalibrary.org> --- Can this be backported to 24.11? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #13 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 184017 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184017&action=edit Bug 40108: [24.11.x] Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36586 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36586 [Bug 36586] Self-checkouts will get CSRF errors if left inactive for 8 hours -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #14 from David Cook <dcook@prosentient.com.au> --- Bug 36586 is getting reverted so might be necessary to revert this too -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #15 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to David Cook from comment #14)
Bug 36586 is getting reverted so might be necessary to revert this too
This fix still makes sense to me without Bug 36586. In main I left this fix as is after reverting Bug 36586. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 David Flater <flaterdavid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184017|0 |1 is obsolete| | --- Comment #16 from David Flater <flaterdavid@gmail.com> --- Created attachment 184498 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184498&action=edit Bug 40108: [24.11.x] Fix print receipt option in self-checkout The self-checkout logout process, with SelfCheckReceiptPrompt enabled, asks the user if they want to print a receipt. Because of an error in time calculation the system always believed the process had timed out and wouldn't print the receipt. Before we implemented a modal dialog to ask for confirmation upon self-checkout logout, it was necessary to have a timeout function built into the process. See Bug 11498. The modal no longer blocks the page timeout function, so this time calculation is obsolete and can be removed. To test, apply the patch and go to the self-checkout module. - Make sure the SelfCheckReceiptPrompt system preference is enabled. - Log in as a user for doing self-checkout. - Click the "Finish" button. - You should see a dialog, "Would you like to print a receipt?" - Clicking "Print receipt..." should open a new window with your receipt and log you out of the self-checkout system. - Clicking "End session" should end your session without triggering a popup. - Set the SelfCheckTimeout system preference to something very low, like 10 seconds. - Perform the same test as above, but after triggering the dialog wait 10 seconds for the timeout to trigger. - The page should reload automatically and log you out. - Disable the SelfCheckReceiptPrompt system preference. - Perform the same tests to confirm that clicking the "Finish" button logs you out immediately without offering to print a slip. Sponsored-by: Athens County Public Libraries Signed-off-by: David Flater <flaterdavid@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #17 from David Flater <flaterdavid@gmail.com> --- Might not need a sign-off, but I did test this on 24.11.x and it both maintains all functionality and passes QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to David Flater from comment #17)
Might not need a sign-off, but I did test this on 24.11.x and it both maintains all functionality and passes QA.
Thanks a lot for this dedicated patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00,25.05.01 |25.11.00,25.05.01,24.11.08 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz Status|Pushed to oldstable |Needs documenting --- Comment #20 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- 39987 - Batch item deletion breadcrumb uses wrong link -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40108 --- Comment #22 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org