From f8175bbc39af409c320a2464a1a4a013331fc631 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 21 Mar 2023 02:49:45 +0000 Subject: [PATCH] Bug 33260: Add Notice management tool This enhancement makes it easy for the library to view sent notices and filter by various search parameters. You can also print sent notices, individually or in a batch. This enhancement uses a new system preference NoticesManagement and a new view_generated_notices user permission. This enhancement has been built on top of Bug 33478 so print format settings are taken into account when printing notices. To test: 1. Apply patches, install database updates, restart services 2. Make sure your logged in user has the view_generated_notices permission checked 3. Enable the NoticesManagement system preference 4. Generate a few notices. There are a few ways to do this including: - place holds, check in items and confirm the holds - place recalls, check in items and confirm the recalls 5. Go to Tools -> Notices management 6. There are two search functions on the left navigation. Confirm the patron search box works by searching for one of the patrons you generated a notice for, you should be redirected to their Notice history. 7. Go back to Notices management. Use the set of search filters to search for notices. Leaving the search filters empty will return all notices generated. Confirm the filters work as expected by using different combinations of filters. 8. Conduct a search so your notices show in a table. Confirm the information fetched about the notices is correct. 9. Click on a notice title. Confirm the contents of the notice show in a pop-up box. 10. Click one of the Print buttons next to a notice. Confirm the notice is opened to be printed. 11. Redo your notices search. Confirm the status of the notice you just printed has now been updated to 'sent'. 12. Use the 'Select all' and 'Clear all' buttons to select or clear the checkboxes. 13. Select a few checkboxes and click the button at the bottom of the table to 'Print selected notices'. Confirm the notices have been collated into one document, separated by horizontal lines, and prints successfully. The statuses for the notices should all be updated to 'sent'. 14. Confirm the Notices management page is not visible without the view_generated_notices permission 15. Confirm the Notices management page is not visible without the NoticesManagement system preference being enabled. 16. Go to a patron's Notices history. If the view_generated_notices user permission is checked for your logged in patron, you should see a Print button for each notice. Confirm this works. Confirm this button doesn't show if your logged in patron does not have the view_generated_notices user permission. It does not require the NoticesManagement system preference. 17. Go to Tools -> Notices & slips 18. Edit the format settings of a few different notices i.e. HOLD and WELCOME 19. Generate these notices by filling a hold for a patron and sending a welcome email 20. Search for all notices under Tools -> Notices management 21. Select all notices and print selected notices 22. Confirm the notices different format settings are taken into account in the printed PDF Sponsored-by: Colorado Library Consortium --- .../prog/en/includes/tools-menu.inc | 5 +- .../prog/en/modules/circ/printslip.tt | 7 +- .../prog/en/modules/members/notices.tt | 4 + .../prog/en/modules/tools/notices.tt | 310 ++++++++++++++++++ .../prog/en/modules/tools/tools-home.tt | 7 +- .../prog/js/patron-autocomplete.js | 4 +- tools/notices.pl | 92 ++++++ tools/print_notice.pl | 53 +++ 8 files changed, 478 insertions(+), 4 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tools/notices.tt create mode 100755 tools/notices.pl create mode 100755 tools/print_notice.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index b106cffbea8..22d3ecd6f1d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -7,7 +7,7 @@ - [% IF ( CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons || CAN_user_tools_edit_patrons || CAN_user_tools_moderate_tags || ( CAN_user_tools_batch_upload_patron_images && Koha.Preference('patronimages') ) || CAN_user_tools_rotating_collections ) %] + [% IF ( CAN_user_tools_manage_patron_lists || CAN_user_clubs || CAN_user_tools_moderate_comments || CAN_user_tools_import_patrons || CAN_user_tools_edit_notices || CAN_user_tools_edit_notice_status_triggers || CAN_user_tools_label_creator || CAN_user_tools_delete_anonymize_patrons || CAN_user_tools_edit_patrons || CAN_user_tools_moderate_tags || ( CAN_user_tools_batch_upload_patron_images && Koha.Preference('patronimages') ) || CAN_user_tools_rotating_collections ) || ( CAN_user_tools_view_generated_notices && Koha.Preference('NoticesManagement') ) %]
Patrons and circulation