Bug 37840 - Wrong status in the Intranet detail page when the item type is not for loan
Summary: Wrong status in the Intranet detail page when the item type is not for loan
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Adolfo Rodríguez Taboada
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-05 07:15 UTC by Adolfo Rodríguez Taboada
Modified: 2024-11-18 22:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
bug 37840 Fix item status in the Intranet detail page when the item has a item type not for loan (2.60 KB, patch)
2024-09-05 07:23 UTC, Adolfo Rodríguez Taboada
Details | Diff | Splinter Review
Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan (2.65 KB, patch)
2024-09-05 21:24 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37840: Fix item status in the Intranet detail page when the item has a item type not for loan (2.71 KB, patch)
2024-09-16 16:34 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Adolfo Rodríguez Taboada 2024-09-05 07:15:25 UTC
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"
Comment 1 Adolfo Rodríguez Taboada 2024-09-05 07:23:45 UTC
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
Comment 2 Adolfo Rodríguez Taboada 2024-09-05 07:27:23 UTC
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
Comment 3 Phil Ringnalda 2024-09-05 21:24:32 UTC
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>
Comment 4 Nick Clemens (kidclamp) 2024-09-16 16:34:40 UTC
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>
Comment 5 Martin Renvoize (ashimema) 2024-09-19 11:51:30 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 6 Lucas Gass (lukeg) 2024-11-18 22:09:21 UTC
Backported to 24.05.x for upcoming 24.05.06