Bug 32611 - Not for loan items don't show the specific not for loan value in OPAC detail page
Summary: Not for loan items don't show the specific not for loan value in OPAC detail ...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords: regression
Depends on:
Blocks: 33933
  Show dependency treegraph
 
Reported: 2023-01-11 18:09 UTC by Caroline Cyr La Rose
Modified: 2024-03-08 10:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04


Attachments
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page (2.53 KB, patch)
2023-02-23 17:21 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page (2.59 KB, patch)
2023-02-23 21:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page (2.64 KB, patch)
2023-02-24 20:48 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-01-11 18:09:28 UTC
When viewing a detailed record on the OPAC, we used to see the specific value of Not for loan (e.g. Ordered). Right now, any Not for loan value displays as "Not for loan" no matter what the authorized value description (or description (OPAC)) is.

To test:
1. In the staff interface, edit an item
2. Change the Not for loan value to Ordered
3. Save
4. Click on "Normal" to see the detailed record
--> Status is "Not for loan (Ordered)"
5. Click on "OPAC view: Open in new window."
--> Status is "Not for loan". It should be "Ordered"
6. Try with any not for loan value
--> Status stays "Not for loan". It should be whatever value you chose
7. Try changing the descriptions or descriptions (OPAC) in Administration > Authorized values > NOT_LOAN
--> Status stays "Not for loan". It should be whatever you put in description (OPAC) or description, if description (OPAC) is empty

I tested in 22.05(.07) and it shows Ordered (or whatever value I put). In master, it always shows "Not for loan".
Comment 1 Katrin Fischer 2023-01-11 18:11:45 UTC
Could this be Bug 32445 - Status display of 'not for loan' items is broken in OPAC/staff ?
Comment 2 Caroline Cyr La Rose 2023-01-11 19:21:41 UTC
(In reply to Katrin Fischer from comment #1)
> Could this be Bug 32445 - Status display of 'not for loan' items is broken
> in OPAC/staff ?

That is what I thought too, but I didn't want to presume since the display was already broken before that patch.
Comment 3 Owen Leonard 2023-02-23 17:21:11 UTC
Created attachment 147260 [details] [review]
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page

This patch corrects what appear to be some copy-paste errors which
resulted in the "not for loan" authorized value description not
displaying, instead the generic "Not for loan" is shown.

The patch also adds another case for displaying the item restricted
status. Previously items.restricted would only display if the item
*also* had a notforloan value.

To test it's probably easiest to find a record with multiple items and
set various item statuses (damaged, notforloan, lost, restricted) and
confirm that the right description is shown.
Comment 4 Katrin Fischer 2023-02-23 21:07:32 UTC
Created attachment 147268 [details] [review]
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page

This patch corrects what appear to be some copy-paste errors which
resulted in the "not for loan" authorized value description not
displaying, instead the generic "Not for loan" is shown.

The patch also adds another case for displaying the item restricted
status. Previously items.restricted would only display if the item
*also* had a notforloan value.

To test it's probably easiest to find a record with multiple items and
set various item statuses (damaged, notforloan, lost, restricted) and
confirm that the right description is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Nick Clemens 2023-02-24 20:48:59 UTC
Created attachment 147400 [details] [review]
Bug 32611: Not for loan items don't show the specific not for loan value in OPAC detail page

This patch corrects what appear to be some copy-paste errors which
resulted in the "not for loan" authorized value description not
displaying, instead the generic "Not for loan" is shown.

The patch also adds another case for displaying the item restricted
status. Previously items.restricted would only display if the item
*also* had a notforloan value.

To test it's probably easiest to find a record with multiple items and
set various item statuses (damaged, notforloan, lost, restricted) and
confirm that the right description is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi 2023-02-27 14:42:25 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 7 Matt Blenkinsop 2023-03-01 09:51:18 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 8 Lucas Gass 2023-03-10 14:25:59 UTC
Does not apply cleanly to 22.05.x, no backport.
Comment 9 David Cook 2023-06-07 04:23:49 UTC
Think this has introduced a different regression...