Bug 12396 - MTT FIX: Due notices (DUEDGST) are multiplicated and all of them are...
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Tue, 10 Jun 2014 06:48:14 +0000 (09:48 +0300)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 18 Jun 2014 20:57:04 +0000 (20:57 +0000)
commitbea454de6251b6a61899efbdd07146300afe309f
tree9814aad9dec722c94471b7165d9c5fe1d6c750ab
parent644937f411b309e48ce7174a787633ad0f337463
Bug 12396 - MTT FIX: Due notices (DUEDGST) are multiplicated and all of them are sent to everybody who is about to receive ODUEDGST.

So the first patron receives correct letters, but the followings received
all the previous ones AND his letters.
Eventually you end up with !n letters in message_queue where n = amount of patrons
receiving due messages as digest and having something due.

Eventually we got 4 000 000 ODUEDGST-letters of which 1 100 000 were sent to our patrons :)
This is madness!

Test plan:
0/ Delete the content of the message_queue table.
1/ Pick 3 patrons and set them to receive due messages as digest.
2/ Check 1 item out for 3 separate patrons and specify a due date today.
3/ Launch the advance_notices.pl script.
4/ Before this patch, you got 6 notices (1+2+3 [!n]). Now, you get 3 notices, 1 for each patron.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Problem exis.
Patch work as described following test plan.
No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
misc/cronjobs/advance_notices.pl