[Koha-bugs] [Bug 31395] Checking in non-existent barcodes makes Koha explode

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 18 21:55:29 CEST 2022


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

ByWater Sandboxes <bws.sandboxes at gmail.com> changed:

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

--- Comment #2 from ByWater Sandboxes <bws.sandboxes at gmail.com> ---
Created attachment 139417
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139417&action=edit
Bug 31395: Only try to cancel holds if item found

This patch makes the code dealing with waiting holds with cancellation
requests be dependent on the fact an item has been found.

The returns.pl controller is a bit messy as the real return takes place
outside the main `if ($item)` block. This should be refactored and
probably run inside a transaction...

In the meantime this patch will make the job.

To test:
1. Try to return an invalid barcode (e.g. ASDQWE)
=> FAIL: Things explode
2. Apply this patch
3. Repeat 1
=> SUCCESS: Doesn't explode!
4. Verify that returning an item with a waiting hold with cancellation
   requests still cancells the hold.
=> SUCCESS: It does!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrewfh at dubcolib.org>

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


More information about the Koha-bugs mailing list