e7e27a934a
Desired behavior of the script advance_notices.pl is that the sender address on the notice message is that of the branch of the issues in question. Thus, the solution is to generate digest messages per branch. To test: 1) Inspect unit test in t/db_dependent/cronjobs/advance_notices_digest.t and note that: - There are three libraries - There is a borrower - The borrower is registered at library1 - The borrower has message preference wants_digest set to 1 - The borrower has message preference days_in_advance set to 1 - The content of the letter PREDUEDGST is '<<count>> <<branches.branchname>>' - There are three items - There is one issue per item - There is one issues at library2 - There are two issues at library3 - The date_due of the issues are set to tomorrow - For the default case (no -digest-per-message) - It is asserted that there is one message in the message queue after running the script - It is asserted that there are three items in the message. - It is asserted that the branchname is that of the borrower's home library. - For the case where -digest-per-message is enabled - It is asserted that there are two messages in the message queue after running the script - It is asserted that the item count of the message corresponding to library2 is 1 - It is asserted that the item count of the message corresponding to library3 is 2 - It is asserted that the branchnames are correct. 2) Run unit test: prove t/db_dependent/cronjobs/advance_notices_digest.t Sponsored-By: Bibliotek Mellansjö, which is a cooperation between Sponsored-By: Gullspångs kommunbibliotek Sponsored-By: Hjo stadsbibliotek Sponsored-By: Karlsborgs bibliotek Sponsored-By: Mariestads stadsbibliotek Sponsored-By: Skövde stadsbibliotek Sponsored-By: Tibro bibliotek Sponsored-By: Tidaholms stadsbibliotek Sponsored-By: Töreboda kommunbibliotek Signed-off-by: Andreas Jonsson <andreas.jonsson@kreablo.se> Signed-off-by: Magnus Enger <magnus@libriotech.no> Adding the --digest-per-branch switch turns the digest into one digest per library. I think it makes perfect sense to keep the default behaviour and hide this new functionality behind a command line switch. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> |
||
---|---|---|
.. | ||
css | ||
en | ||
img | ||
js | ||
sound |