Bug 37312

Summary: BlockReturnOfWithdrawnItems doesn't block transfers when set to block
Product: Koha Reporter: Esther Melander <esther.melander>
Component: CirculationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, phil
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Esther Melander 2024-07-10 19:04:13 UTC
To replicate:

1. Ensure the system preference BlockReturnOfWithdrawnItems is set to block.
2. Find a bibliographic record with an item at the Main library.
3. Set the Withdrawn status of item to Withdrawn.
4. Change the logged in library to Central.
5. Check in the item. See that the item can't be checked in.
6. Refresh the bibliographic page and take note that the current library has not been updated to Central.
7. Go to Circulation - Transfers.
8. Ensure the transfer to library is Central.
9. Scan the library and see the message states "Item is already at destination library."
10. Refresh the bibliographic record and see the current library still displays as Main Library.
11. Back on the transfer page, select a different library like East and attempt the transfer again. See the transfer goes through.
12. Refresh the bibliographic record and see the Current library has updated to Central and now shows the item status as being transferred.

It appears that on step 5, the current library is being updated in the background, even though the record does not appear to update with the current location. I would not expect that to happen because of the system preference set to block. I also would not expect to be able to transfer something without at least a warning.

A much simpler scenario:

1. Find a bibliographic record with an item at the Main Library. Set the item status to withdrawn. 
2. Go to Circulation - Transfers.
3. Select another branch, like East Library and submit barcode.
4. See that the transfer goes through.
5. Change the logged-in library to East.
6. Try to check-in the item and see it is blocked and the transfer status can't be updated.

I would expect at least a warning that the item has been withdrawn. Perhaps a system preference that blocks transfers of withdrawn items is needed.
Comment 1 Phil Ringnalda 2024-07-10 22:08:15 UTC
(In reply to Esther Melander from comment #0)
> It appears that on step 5, the current library is being updated in the
> background, even though the record does not appear to update with the
> current location.

It seems much more likely to me that at step 11, you say "transfer this from Central to East" by initiating a transfer while logged in at Central, so it sets Current to Central.
Comment 2 Esther Melander 2024-07-11 15:02:16 UTC
Yes, that makes sense.

The key here is a transfer can't be completed because the item can't be checked-in, so perhaps transfers should be blocked when an item has a status of withdrawn. Though I can see a library withdrawing an item and moving it to another location before removing it from the system. This may need a bit of discussion.