Bug 32529: Make Koha::Item->safe_to_delete consider 'P' holds as found
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 26 Dec 2022 18:27:02 +0000 (15:27 -0300)
committerJacob O'Mara <jacob.omara@ptfs-europe.com>
Fri, 13 Jan 2023 15:53:22 +0000 (15:53 +0000)
commitc09db113208f77ac9c2edcbb8c993eea04c452db
tree80ff138276bb8d5dfb387022ba1c4537240fd6f7
parentce9a83746803bf7ac63fe5d9cb856b8830c9a614
Bug 32529: Make Koha::Item->safe_to_delete consider 'P' holds as found

Currently, the Koha::Item->safe_to_delete method checks (among other things) if there are existing waiting or in-transit holds.

It seems that 'In processing' should block item deletion as well.

This patch implements that.

To test:
1. Apply up to the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Boo! Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 0e8f28b94212da131a2a289c500cd823dbc4a5e7)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
Koha/Item.pm