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)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 5 Jan 2023 12:21:15 +0000 (09:21 -0300)
commit0e8f28b94212da131a2a289c500cd823dbc4a5e7
tree69c50ca0678d5e434c335f79b868e09038128e27
parentc3d7d72bc3e9cb433cea89657b8f5d110e898a1b
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>
Koha/Item.pm