[Koha-bugs] [Bug 22379] ILS-DI Method "CancelHold" don't check CanReserveBeCanceledFromOpac

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jan 27 05:46:16 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22379

Arthur Suzuki <arthur.suzuki at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #94387|0                           |1
        is obsolete|                            |

--- Comment #5 from Arthur Suzuki <arthur.suzuki at biblibre.com> ---
Created attachment 97959
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97959&action=edit
Bug 22379: Fix checks not made by ILS-DI method CancelHold

Disable the possibility for a borrower to cancel a reservation
which is either in a Transit or Waiting state.
This reproduce the behaviour seen on the OPAC.
Also replaces previous checks on the borrowernumber
since CanReserveBeCanceledFromOpac already checks this.

--------------------------------

Test plan (before patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
        -> Should fail and reply "RecordNotFound"
        -> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
        -> Should succeed, reply with "Canceled"
        -> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
        -> Should succeed, reply with "Canceled"
        -> Reserve do not show up in the list of holds for the borrower

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
        -> Should succeed, reply with "Canceled"
        -> Reserve do not show up in the list of holds for the borrower

--------------------------------

Test plan (after patch) :
-Put a reserve for a borrower
-Try to cancel the reserve providing another borrowernumber as argument
        -> Should fail and reply "BorrowerCannotCancelHold"
        -> Reserve still appears in the list of holds.

-Try to cancel the reserve providing the borrowernumber the reserve is
for.
        -> Should succeed, reply with "Canceled"
        -> Reserve do not show up in the list of holds for the borrower

-Put a new reserve with a pickup branch != from the homebranch
-Transfer the item to the pickup branch (reserve status = Transit)
-Try to cancel the reserve (with proper borrowernumber)
        -> Should fail and reply "BorrowerCannotCancelHold"
        -> Reserve still appears in the list of holds.

-Checkout the reserved item in the pickup branch (reserve status =
Waiting)
-Try to cancel the reserve (with proper borrowernumber)
        -> Should fail and reply "BorrowerCannotCancelHold"
        -> Reserve still appears in the list of holds.

Signed-off-by: Laurence Rault <laurence.rault at biblibre.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list