[Koha-bugs] [Bug 17649] Create only one message per borrower and overdue level

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 29 16:39:57 CEST 2023


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

Magnus Enger <magnus at libriotech.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #145695|0                           |1
        is obsolete|                            |

--- Comment #23 from Magnus Enger <magnus at libriotech.no> ---
Created attachment 148927
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148927&action=edit
Bug 17649: Only one message per borrower and overdue level

The added option (-a|--all_in_one) allows to create only one message per
borrower and delay level
including overdues from whatever branches.
A branchcode value (branches.branchcode) has to be given to choose which sender
address will be set.

== test plan ==
0/ Have (or create) at least two branches B1 and B2. Have (or create) a default
notice for all branches in Notices and Slips Module
1/ Make sure you're logged in with an account belonging to B1, or switch to
branch B1
2/ checkout item I1 (belonging to B1) to patron P (specifying as due date the
day before (1 day overdue))
3/ switch to branch B2
4/ checkout item I2 (belonging to B2) to patron P (specifying as due date the
day before (1 day overdue))
5/ make sure you have defined "Overdue notice/status triggers" for that patron
category, ie with Delay=1 so that "Overdue Notice" is selected and "Email" is
checked.
6/ from cli run 'perl ./misc/cronjobs/overdue_notices.pl' (optionally
specifying also '-library B1 -library B2' )
7/ Two new entries will be generated in message_queue DB table, coming from
different branches that have the SAME list of overdue items
8/ either see the 'content' field in these entries, or run 'perl
./cronjobs/process_message_queue.pl' to receive the actual emails (provided the
email is properly setup).

Apply patch
redo step 6 running the script with the new option -a (all_in_one). this option
expect as mandatory parameter the branchcode of the library that you want to
make sender of the message. say that 'B2CODE' is the branchcode of B2 branch,
it will run like this :
perl ./misc/cronjobs/overdue_notices.pl -a B2CODE
You will see that only one message had been created. Its content shows both B1
and B2 overdue items and the sender address matches B2 address as well.

Signed-off-by: Magnus Enger <magnus at libriotech.no>
Works as advertised.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list