Bug 17766 - Patron notification does not work with multi item holds
authorBenjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Tue, 13 Dec 2016 13:57:52 +0000 (14:57 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 15 Jan 2017 16:36:44 +0000 (17:36 +0100)
commit4abcbd93ac923ab1cc048a8b1f6f86c3b7e14c1c
treeb3e3f2ad4397f270ef7f64baa963caddd043be15
parent9fe474695f589fa1cac63d6d1dd5dbbc56bbe335
Bug 17766 - Patron notification does not work with multi item holds

This patch fixes notification when same biblio has multiple reserves with same borrower,
introduced in Bug 14695. C4::Reserves::ModReserveAffect uses internal method
_koha_notify_reserve but sends itemnumber and biblionumber instead of record_id.

To test:
Prerequisites:
- One biblio with two items attached
- A patron with hold_filled notification activated
- A letter for HOLD with <<reserves.reserve_id>> in it
1) Place two reservations on same biblio
2) checkin item x on pickup branch, observe patron message generated
3) checkin item y on pickup branch, observe patron message generated
4) note that reserve_id is the same on both messages, which is wrong
5) apply this patch and repeat 1-3
6) now observe notifications have correct (different) reserve_id

Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5a08969a71dc27562a1a22af809673a8727f5c82)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
C4/Reserves.pm
t/db_dependent/Reserves/MultiplePerRecord.t