Bug 37334 reinstated to ability to filter holdings table with status. We noticed that filtering holdings table with status "In transit" shows every item that has been transferred even once. Meaning if there is even one row mentioning it's itemnumber in branchtransfers it is considered as "In transit". The transfers does not have to be currently active when it is considered "In transit". This also causes the "Available" status not to work properly because they are often considered as "In transit" (at least in our large consortium items transfer alot between branches and it is quite rare that item has never been transferred in it's lifetime) How to test: 1. Transfer item 1 from branch A to branch B 2. Receive/Fullfill the transfer in branch B - Item is now "Available" 3. Go to items record and filter holdings table with status In transit 4. Notice that item 1 is shown even when it is actually "Available" 5. Filter holdings table with status "Available" and notice that item 1 is not shown. I have tested this in version 25.05.03 and in Open Fifth's sandbox and it happens in both of them.
Created attachment 189924 [details] [review] Bug 41298: Fix filtering items by in transit The filtering condition was not correct, the presence of a line in the transfer table is not enough to now if the item is in transit. Here we filter reusing the same conditions as Koha::Item::Transfer->in_transit Test plan: Have at least 2 items for a given bibliographic record Transfer item 1 Transfer item 2 Receive/Fullfill the transfer for item 1 Item 1 is now available and item 2 is in transit Go to items record and filter holdings table with status "In transit" => Only item 2 is displayed Filter holdings table with status "Available" => Only item 1 is displayed
Created attachment 189925 [details] [review] Bug 41298: Fix filtering items by in transit The filtering condition was not correct, the presence of a line in the transfer table is not enough to now if the item is in transit. Here we filter reusing the same conditions as Koha::Item::Transfer->in_transit Test plan: Have at least 2 items for a given bibliographic record Transfer item 1 Transfer item 2 Receive/Fullfill the transfer for item 1 Item 1 is now available and item 2 is in transit Go to items record and filter holdings table with status "In transit" => Only item 2 is displayed Filter holdings table with status "Available" => Only item 1 is displayed Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>