https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33260

--- Comment #574 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 209713
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209713&action=edit
Bug 33260: (QA follow-up) Ask for confirmation before marking notices as
printed

This changes the workflow, and can be left out without affecting the
other patches: without it, notices are marked as printed when the print
page is opened, as before.

Marking a notice as printed as soon as the print window is opened is
wrong if the librarian then cancels the print dialog. There is no browser
API to tell the difference: the 'afterprint' event is fired after the
print dialog is closed whether the notices were printed or not, and there
is nothing to say which. The only way to know is to ask, so this adds a
confirmation step to the workflow:

1. press Print (in the modal, the actions column or for the selection),
2. press Print in the print dialog of the browser,
3. confirm that the notices were printed ("Yes, mark as printed"), or
   print again, or close without marking.

Displaying the notices no longer changes anything, so the print buttons
become plain GETs. Only the explicit confirmation, a POST with a CSRF
token and the 'cud-mark_printed' operation, marks the notices as printed.
Libraries that print with their own script (IntranetSlipPrinterJS) are
asked for the confirmation straight away. The page the librarian came
from is reloaded to show the new status, and the notices that cannot be
printed are listed as skipped.

To test:
1. Enable NoticesManagement and NoticesLog and queue some notices.
2. In Tools > Notices management, print a sent notice. Cancel the print
   dialog and click "Close without marking": the notice is still 'sent'.
3. Print it again and click "Yes, mark as printed" after the print
   dialog: it is now 'printed', and logged (module Notices, action
   PRINT).
4. Open /cgi-bin/koha/members/print_notice.pl?message_ids=ID of a notice
   in the browser: the notice is displayed but its status does not change.
5. Select notices that include one that cannot be printed (a pending
   email) and print the selection: the others are printed and the page
   says one was skipped.
6. Sign off

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to