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

Martin Renvoize <[email protected]> changed:

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

--- Comment #12 from Martin Renvoize <[email protected]> ---
Created attachment 133903
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133903&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 <[email protected]>
Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to