CHECKIN, CHECKOUT and HOLD digest notices are not generated "all at once", but we generate a notice with the first action and then keep amending it until the notice is sent. This creates a number of problems: * We cannot make sure to include current/updated information in the notice, this might lead to hold pick-up notices be sent out for already picked up holds for example. * We limit what we can do with TT and need to rely on repetition markers ----. This is non-standard and we often had them deleted and notices broken in support. ... From bug 15278: > (In reply to Martin Renvoize from comment #23) > > > As for the --- digest thing, I feel like the logic for that one is backwards > > and strange.. we should be generating the notice all in one hit at a later > > point in time rather than queuing a notice and then munging extra stuff into > > it after the fact at various times. > > The --- digest thing also doesn't make much sense to me. > With putting it together at one point in time, would that mean that say for > hold notices when notices send every hour that before that happened it would > build and check for the patron any waiting holds that had been set to > waiting since the last one? > > Or perhaps we could set some sort of flag when the hold is trapped that gets > cleared when the notice is sent? If we know the exact time something was checked in, checked out or set to waiting, we might be able to use this information to build the notice. But then maybe need to remember when the last notice was sent? The flag might be a more reliable idea and also would make it easy to resend some or all whenever needed.
Not completely knowing how all this work, what I am seeing Katrin say makes sense. It would be great if the cron job gathered information and checked validity at the time of delivery. This might prove problematic for systems that have more frequent delivery times, but I don't know. However, this might resolve issues where holds have been picked up, or patron information has changed (name, other patron data, addresses/phone numbers/sms numbers. This might also make a way to address issues with resending, where the delivery format was changed. The resend should go out as whatever the current delivery method is. This new workflow might aid in making that possible.
I think we need to give some thought on what the best way to implement this would be, but it should not create problems with performance etc. as we would only write to the database less and it would be de-coupled from the transaction (checkin, checkout) itself.
Thanks for filing this, Katrin! Another thing to keep in mind is anonymization (and maybe pseudonymization?). If checkouts are anonymized on checkin, the CHECKIN digest notice will not be able to pull useful data from the old_issues table (CHECKINSLIP already has this issue - see bug 28896).
This is a good point, thanks Emily!
*** Bug 31656 has been marked as a duplicate of this bug. ***
I've noticed that this method of creating digests for holds can sometimes lead to duplication of information in notices under certain circumstances. For example, if a hold is triggered and then has its waiting status reverted before being checked in and triggered again, the hold digest will repeat the title in the notice.