Bug 31101 - Allow other separation options for digesting circulation alerts (checkin, checkout, renewal)
Summary: Allow other separation options for digesting circulation alerts (checkin, che...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-05 12:14 UTC by Marcel de Rooy
Modified: 2022-07-18 09:53 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2022-07-05 12:14:21 UTC
In Circulation::SendCirculationAlert we find the only use of the C4::Message module and one of the last TRUNCATE calls btw in the same context:

        my $message = C4::Message->find_last_message($borrower, $type, $mtt);
        unless ( $message ) {
            C4::Context->dbh->do(q|UNLOCK TABLES|) unless $do_not_lock;
            C4::Message->enqueue($letter, $borrower, $mtt);
        } else {
            $message->append($letter);
            $message->update;

The append method digests multiple notices by looking for a ---- separator:
    if ($letter->{content} =~ /----/) {
        my ($header, $body, $footer) = split(/----\r?\n?/, $letter->{content});

In the first place I would not mind sending these notices separately. But anyway.
If we do combine them (within the timeframe of the message queue processing interval), it would be convenient to allow separating too on an html tag like <item> as used elsewhere in notices.

I looked a bit at the notice digesting and actually only find this feature working for advance notices. The overdue digest flag is a bit weird: the job already digests by default?
Comment 1 Katrin Fischer 2022-07-15 18:57:33 UTC
What do you mean by ovedue digest flag?
Comment 2 Marcel de Rooy 2022-07-18 06:54:29 UTC
(In reply to Katrin Fischer from comment #1)
> What do you mean by ovedue digest flag?

The digests only box on Messaging preferences.
Comment 3 Katrin Fischer 2022-07-18 09:53:26 UTC
I think the 'overdue' confused me, as we don't have the overdues in messaging preferences. Overdues are digested by branch/overdue level or you can include all overdue items with a flag.