[Bug 29490] New: Preview for more notices
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Bug ID: 29490 Summary: Preview for more notices Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org It would be great to have the preview option available on more notices.. currently, it's limited to CHECKIN, CHECKOUT and HOLD_SLIP. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17981 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17981 [Bug 17981] Add the ability to preview generated notice templates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com --- Comment #1 from Lisette Scheer <lisette.scheer@bywatersolutions.com> --- Yes, this would be especially helpful for new libraries coming to Koha who need to test notices before crons are turned on. You can do it by running the message queue in a very targeted way, but that takes more back end work, making it less accessible to libraries. Also, changes to overdue notices need to wait until the overdues run overnight to make sure nothing goes wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- For a workaround when testing SendAllEmailsTo could be helpful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Hans Pålsson <hans.palsson@hkr.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hans.palsson@hkr.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Mollie Myers <mmyers@eulesstx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mmyers@eulesstx.gov --- Comment #3 from Mollie Myers <mmyers@eulesstx.gov> --- Not being able to preview or test these prior to "going live" with them currently causes undue stress and anxiety on those of us changing the notices and we fear breaking legit notices that are going to other patrons. This would be a fantastic advancement for being able to preview notices prior to confirming those changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org --- Comment #4 from George Williams (NEKLS) <george@nekls.org> --- Library staff should be able to preview all notices and slips without any work-arounds or need for a testing environment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to George Williams (NEKLS) from comment #4)
Library staff should be able to preview all notices and slips without any work-arounds or need for a testing environment.
The problem is that you can't generate a preview of the notices without data. With TT you can potentially pull date from almost everywhere in the system. Just saying, this is not something that's easily solved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #5)
(In reply to George Williams (NEKLS) from comment #4)
Library staff should be able to preview all notices and slips without any work-arounds or need for a testing environment.
The problem is that you can't generate a preview of the notices without data. With TT you can potentially pull date from almost everywhere in the system.
Just saying, this is not something that's easily solved.
I've been thinking about that... We can't generate a perfect preview without data, but we could preview a lot of the notice. I've had librarians just want to check if their HTML/CSS is right regardless of the data passed into the notice. Maybe we could have a confirm box where someone tries to preview without data we could say "Warning! You have not provided any data. Preview may not fully resemble actual notice." or something like that. I don't know. Just a thought I've had lately. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We could do that, but it might not include the most critical, like a view of a list of items. I wonder if we could do a pop-up form for people to enter some information about objects used. Like if it uses a borrower-Object, ask for a borrowernumber... but of course that would add a lot of additional complexity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #8 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #7)
We could do that, but it might not include the most critical, like a view of a list of items.
I wonder if we could do a pop-up form for people to enter some information about objects used. Like if it uses a borrower-Object, ask for a borrowernumber... but of course that would add a lot of additional complexity.
I suppose another option could be something like the TestBuilder. Maybe a NoticeBuilder that creates fake objects with fake data, although that might have limited utility for complex cases. But maybe not a bad starting point. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=29490 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Which one would be useful? It is straighforward but need to be done one by one. Added "HOLD" to show how easy it is (and it's certainly not as easy for all of the notice templates ofc). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 170940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170940&action=edit Bug 29490: Add preview for HOLD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Michael Adamyk <michael.adamyk@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.adamyk@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 ckeller@toledomuseum.org <ckeller@toledomuseum.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ckeller@toledomuseum.org --- Comment #11 from ckeller@toledomuseum.org <ckeller@toledomuseum.org> --- I would greatly appreciate the ability to preview more notices. We have specific notices for ILLs, among others, and I use HTML editing, so I would like the opportunity to review them before they are distributed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Lauren Denny <lauren_denny@sil.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lauren_denny@sil.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Dani <library@fairfield.lib.ia.us> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |library@fairfield.lib.ia.us --- Comment #12 from Dani <library@fairfield.lib.ia.us> --- I'm having to gussy up our notices because Gmail is auto-flagging the default Koha notices as spam. I'm not confident in my HTML skills, so previewing my notices before publishing the changes would be super helpful. At the very least, there should be an option to push a notice to a staff member's email so it can be reviewed immediately instead of waiting for the automation to go through. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- (In reply to Dani from comment #12)
I'm having to gussy up our notices because Gmail is auto-flagging the default Koha notices as spam.
Are you sure that it's your email content? It could be worthwhile double-checking what From/Sender address you're using for your emails. If it fails SPF/DKIM checks, then Gmail will block it or treat it as spam.
I'm not confident in my HTML skills, so previewing my notices before publishing the changes would be super helpful. At the very least, there should be an option to push a notice to a staff member's email so it can be reviewed immediately instead of waiting for the automation to go through.
That would be pretty cool. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Juanita Jayne <jjayne@luzernelibraries.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jjayne@luzernelibraries.org --- Comment #14 from Juanita Jayne <jjayne@luzernelibraries.org> --- I agree with George and reiterate that library staff should be able to preview all notices and slips without any workarounds or need for a testing environment. In preview mode, generic terms could auto-generate, like "Dear FIRSTNAME LASTNAME" and "If you have questions, please email the library at HOMELIBRARY@GENERICDOMAIN.ORG." Maybe someone is asking for a preview that auto-generates real-time information, but I'm not. I'd just like a way to see the formatting without creating new test patrons, test checkouts, etc., or manually expiring someone with a staff email just to wait for 1+ days to see if the generated email formatting is lumped together without spacing or aesthetically correct. Just my 2¢... Thanks for your consideration! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.renvoize@openfifth.c |lisette@bywatersolutions.co |o.uk |m 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=29490 Lisette Scheer <lisette@bywatersolutions.com> 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=29490 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170940|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29490 --- Comment #15 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 211799 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211799&action=edit Bug 29490: Preview for more notices Only the CHECKIN, CHECKOUT and HOLD_SLIP notices could be previewed, as each needed its own code to get the data of the notice, and their data had to be given in a specific format (e.g. barcode|borrowernumber). Notices can now all be previewed. Their data is built from what each notice receives, as listed in Koha::Notice::Template::Variables (bug 36588), by the new Koha::Notice::Template::Preview. In the notice editor, "Data for preview" is replaced with fields for the records the notice receives, all optional (Enter previews the template shown): a patron (card number) and an item (barcode) for circulation notices, a basket and a vendor for basket orders, a vendor for claims, a hold, a suggestion, an ILL request, a booking, an OAI server for OAI harvest reports... Notices not listed in the registry get a patron and an item. The notice is previewed with these records and those related to them: - the vendor and the orders of a basket, the patron and the item of a hold, the patron who made a suggestion... - the library as the senders give it: the pickup library of a hold, booking or recall, the circulation control library for checkouts, checkins and renewals, else the library of the patron - the item or the item of the patron's first checkout, their latest credit or debit, their holds, overdues, checkouts... - for other kinds of records, the latest whose table refers to all the records given (e.g. the hold of the patron on the item), else to one of them, which a note says (e.g. by basketno, borrowernumber, itemnumber, biblionumber), following the relationships of the database - for a hold, booking... on a record, an item of that record - values taken from a record, as the registry says with 'from' (e.g. the servername, endpoint and set of the OAI server of OAI_HARVEST_REPORT) - an example record of the kind when none is related, their checkouts for overdues when the patron has no overdues, and placeholders (e.g. [passwordreseturl]) for values. Without a patron, notices receiving one are previewed with an example patron; other notices (e.g. acquisition notices) get none. - the same data for the bespoke syntax, passed as tables so that <<table.column>> values are formatted as in sent notices (e.g. dates), <<items.content>> and <item>...</item> The preview says which data does not come from the records given. Notices sent once per item, whose notices for several items are combined into one message while the first is not sent yet (C4::Message->append): CHECKOUT, CHECKIN and RENEWAL, and HOLDDGST (the digest of waiting holds), can be previewed with several items, separated by commas, or with the patron's (their checkouts, returns or waiting holds, up to 3). Each item is previewed with its own records (e.g. its checkout, the patron's hold on it), and the results are combined as queued notices are: lines of ---- separate the header and the footer from the part repeated for each item. The bodies of all the items are put between the header and the footer of the last one, and the subject is that of the first item, as C4::Message->append only changes the content of the message queued for the first item. Without barcodes, up to 3 items of the patron are used, which shows how the notice combines without making the preview long. Is there a reason to preview more by default? (Any number of barcodes can be entered.) The records are also passed as tables, with the module, code and transport of the notice, as the code sending each notice does (e.g. the hold of HOLD notices, the itemnumber of issues), so that plugins adding content to notices with the notices_content hook (e.g. Rapido ILL, for holds on ILL requests) get the same data in a preview as in a notice. Test plan: 1. Apply the patch and restart services 2. Check out an item to a patron, with a due date in the past 3. Go to Tools > Notices and slips and edit the ODUE notice 4. "Preview with" offers a patron. Enter the card number of the patron, and click Preview in the Email template: => The notice is previewed for the patron, listing their overdue item 5. Edit the PASSWORD_RESET notice (Patrons) and preview it: => No record is offered; [passwordreseturl] and [user] are shown as placeholders, as the note above the preview says 6. Edit BOOKING_CONFIRMATION (Bookings): a booking is offered. Preview it without one: => If there are no bookings, the preview says the booking is empty, else that an example booking is used Enter the ID of a booking and preview again: => The preview uses that booking 7. Edit HOLD_SLIP (Circulation): a patron, an item and a hold are offered. Enter the ID of a hold only, and preview it: => The hold slip is previewed with the hold, its patron and its item, and [% branch.branchname %] is its pickup library 8. Enter a card number that does not exist and preview: => The preview says the patron was not found, and uses an example patron 9. Edit a notice using the bespoke syntax, e.g. with <<borrowers.firstname>>, <<borrowers.dateexpiry>> and <<items.content>>, and preview it with the patron of step 2: => Their first name and their item are shown, and the expiry date is formatted as dates are in sent notices 10. Create a basket for a vendor, with an order 11. Edit ACQORDER (Acquisitions): a basket and a vendor are offered, no patron. Add [% basket.basketname %], [% bookseller.name %] and [% FOREACH o IN orders %][% o.ordernumber %] [% END %] to the email template, enter the basket number, and preview it: => The basket, its vendor and its order are shown, and no example patron is used 12. Add an OAI server (Administration > OAI repositories), and edit OAI_HARVEST_REPORT (Catalog): an OAI server is offered. Preview it with the name of the server: => Its name, endpoint, set, data format and record type are shown; the numbers of records are placeholders 13. Edit CHECKOUT: "Items" takes several barcodes. Set the subject of the email template to "Checkout of [% item.barcode %]", its message body to "Hello", "----", "[% item.barcode %]", "----", "Bye" (one per line), enter two barcodes separated by a comma, and preview it: => One message, with Hello, both barcodes and Bye, and a note that the notices for 2 items are combined => The subject is "Checkout of" the first barcode only: as when the notices are sent, the message gets the subject of the first item 14. prove t/db_dependent/Koha/Notice/Template/Preview.t 15. yarn cypress run --spec t/cypress/integration/Tools/NoticePreview_spec.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org