[Koha-bugs] [Bug 20478] Advance notices: send separate digest messages per branch
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Mar 8 14:01:31 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20478
Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #80903|0 |1
is obsolete| |
--- Comment #21 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 86383
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86383&action=edit
Bug 20478: Have the cronjob script advance_notices.pl send digest messages per
branch.
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 at kreablo.se>
Signed-off-by: Magnus Enger <magnus at 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 at ptfs-europe.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list