[Bug 11445] New: it is possible for duplicate hold notifications to be sent
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Bug ID: 11445 Summary: it is possible for duplicate hold notifications to be sent Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: gmcharlt@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If an item that fills a hold request is checked in twice and the hold is confirmed each time, it is possible for multiple hold notifications to be sent to the patron even if the item was already marked as waiting on the hold shelf after the first checkin. This is because ModReserveAffect() includes a call to GetReserveInfo() that was never updated when the holds API was updated to use reserve_id. Consequently, ModReserveAffect fails to correctly determine if the item was already waiting. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 --- Comment #1 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 23811 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23811&action=edit Bug 11445: regression test for duplicate hold notifications This patch implements a regression test for verifying that duplicate hold notifications aren't sent if ModReserveAffect() is called repeatedly (as might happen if a circ operator accidentally checks in an item and confirms its hold more than once). Note that the test depends on the fact that _koha_notify_reserve() defaults to sending a HOLD_PRINT letter if the borrower has not specified an email or SMS hold notification. To test: [1] Run prove -v t/db_dependent/Reserves.t [2] The 'patron not notified a second time (bug 11445)' test should fail. [3] Apply the main patch and run prove -v t/db_dependent/Reserves.t again. This time all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> --- Created attachment 23812 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23812&action=edit Bug 11445: avoid sending duplicate hold waiting notifications This patch fixes a problem where a patron could receive duplicate hold waiting notifications. For example, this could happen if a circ operator checked in an item more than once and confirmed the same hold each time. To test: [1] Set up a test patron that received hold waiting notifications. [2] Put an item on hold for the patron, then check the item in and confirm the hold. Verify that a hold notification is sent (or inspect the message_queue table). [3] Check the item in again and confirm the hold again. A duplicate hold notification will be generated. [4] Apply the patch. [5] Repeat steps 2 and 3. This time, only one notification should be generated. [6] Verify that prove -v t/db_dependent/Reserves.t passes. Signed-off-by: Galen Charlton <gmc@esilibrary.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23811|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23842 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23842&action=edit Bug 11445: regression test for duplicate hold notifications This patch implements a regression test for verifying that duplicate hold notifications aren't sent if ModReserveAffect() is called repeatedly (as might happen if a circ operator accidentally checks in an item and confirms its hold more than once). Note that the test depends on the fact that _koha_notify_reserve() defaults to sending a HOLD_PRINT letter if the borrower has not specified an email or SMS hold notification. To test: [1] Run prove -v t/db_dependent/Reserves.t [2] The 'patron not notified a second time (bug 11445)' test should fail. [3] Apply the main patch and run prove -v t/db_dependent/Reserves.t again. This time all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23812|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 23843 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23843&action=edit Bug 11445: avoid sending duplicate hold waiting notifications This patch fixes a problem where a patron could receive duplicate hold waiting notifications. For example, this could happen if a circ operator checked in an item more than once and confirmed the same hold each time. To test: [1] Set up a test patron that received hold waiting notifications. [2] Put an item on hold for the patron, then check the item in and confirm the hold. Verify that a hold notification is sent (or inspect the message_queue table). [3] Check the item in again and confirm the hold again. A duplicate hold notification will be generated. [4] Apply the patch. [5] Repeat steps 2 and 3. This time, only one notification should be generated. [6] Verify that prove -v t/db_dependent/Reserves.t passes. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #23842|0 |1 is obsolete| | Attachment #23843|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 23852 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23852&action=edit [PASSED QA] Bug 11445: regression test for duplicate hold notifications This patch implements a regression test for verifying that duplicate hold notifications aren't sent if ModReserveAffect() is called repeatedly (as might happen if a circ operator accidentally checks in an item and confirms its hold more than once). Note that the test depends on the fact that _koha_notify_reserve() defaults to sending a HOLD_PRINT letter if the borrower has not specified an email or SMS hold notification. To test: [1] Run prove -v t/db_dependent/Reserves.t [2] The 'patron not notified a second time (bug 11445)' test should fail. [3] Apply the main patch and run prove -v t/db_dependent/Reserves.t again. This time all tests should pass. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 23853 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23853&action=edit [PASSED QA] Bug 11445: avoid sending duplicate hold waiting notifications This patch fixes a problem where a patron could receive duplicate hold waiting notifications. For example, this could happen if a circ operator checked in an item more than once and confirmed the same hold each time. To test: [1] Set up a test patron that received hold waiting notifications. [2] Put an item on hold for the patron, then check the item in and confirm the hold. Verify that a hold notification is sent (or inspect the message_queue table). [3] Check the item in again and confirm the hold again. A duplicate hold notification will be generated. [4] Apply the patch. [5] Repeat steps 2 and 3. This time, only one notification should be generated. [6] Verify that prove -v t/db_dependent/Reserves.t passes. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Works as described. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11445 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |fridolyn.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Patches pushed to 3.14.x, will be in 3.14.3. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org