Items that belong to item types that are defined as not for loan appear with status "Available" in the Intranet detail page, which is wrong as the status should be "Not for loan". In the OPAC detail page, the status appears correctly as "Not for loan"
Created attachment 171047 [details] [review] bug 37840 Fix item status in the Intranet detail page when the item has a item type not for loan When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan. Test plan: 1 Define an item type as "Not for loan" 2 Add or edit an item so that its item type is "Not for loan" 3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan" 4 Apply patch, restart services 5 Check that the status is now "Not for loan" in both Intranet and OPAC
The error is in the way it obtains the value of not for loan for the item type. item_types_notforloan[row.item_type_id] returns undefined always item_types_notforloan.get(row.item_type_id) returns 1 or 0
Created attachment 171106 [details] [review] Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan. Test plan: 1 Define an item type as "Not for loan" 2 Add or edit an item so that its item type is "Not for loan" 3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan" 4 Apply patch, restart services 5 Check that the status is now "Not for loan" in both Intranet and OPAC Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Created attachment 171570 [details] [review] Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan When the item type is not for loan, the item status must be "Not for loan". Now in the Intranet status is Available while in the OPAC it's Not for loan. Test plan: 1 Define an item type as "Not for loan" 2 Add or edit an item so that its item type is "Not for loan" 3 Check that the status in the Intranet detail page shows Available while the OPAC detail page shows "Not for loan" 4 Apply patch, restart services 5 Check that the status is now "Not for loan" in both Intranet and OPAC Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Backported to 24.05.x for upcoming 24.05.06