Bug 28761 - Item status shows incorrectly on opac-course-details.pl
Summary: Item status shows incorrectly on opac-course-details.pl
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-26 19:56 UTC by Andrew Fuerste-Henry
Modified: 2021-09-27 19:19 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
Fixes a problem in the OPAC course reserves table where restricted and not for loan statues were not displaying properly in the Status column.


Attachments
Bug 28762: Handle different item statuses in course details (2.84 KB, patch)
2021-07-27 20:36 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28761: better handle notforloan and restricted status in item.status.inc (3.54 KB, patch)
2021-07-27 21:37 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28761: better handle notforloan and restricted status in item.status.inc (3.60 KB, patch)
2021-07-28 11:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28761: better handle notforloan and restricted status in item.status.inc (3.50 KB, patch)
2021-07-31 13:40 UTC, Lucas Gass
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-07-26 19:56:37 UTC
To recreate:
- create a course in course reserves, add an item to it.
- confirm your item shows Available for its status on opac-course-details.pl
- give your item a notforloan status
- reload opac-course-details.pl, confirm its still "available"
- give your item a restricted user status
- reload opac-course-details.pl, confirm its still "available"
- give your item a lost, damaged, or withdrawn status
- reload opac-course-details.pl, these statuses *are* reflected

Filing a separate bug for the staff client.
Comment 1 Lucas Gass 2021-07-27 20:36:58 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass 2021-07-27 21:37:26 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2021-07-28 11:46:51 UTC Comment hidden (obsolete)
Comment 4 Nick Clemens 2021-07-30 11:30:08 UTC
This patch also affects the details page on the opac, and the cart

Before this patch a restricted item shows as:
Available (Restricted Access)

After it is:
Restricted Access
Comment 5 Lucas Gass 2021-07-31 13:40:54 UTC
Created attachment 123351 [details] [review]
Bug 28761: better handle notforloan and restricted status in item.status.inc

To test:
1. create a course in course reserves, add an item to it.
2. confirm your item shows Available for its status on
   opac-course-details.pl
3. give your item a notforloan status
4. reload opac-course-details.pl, confirm its still "available"
5. give your item a restricted user status
6. reload opac-course-details.pl, confirm its still "available"
7. give your item a lost, damaged, or withdrawn status
8. reload opac-course-details.pl, these statuses *are* reflected
9. apply patch
10. check notforloan and restricted, they should be reflect the correct status now
11. restricted status should NOT cause the item to become unavailable
11. The item-status.inc also effects opac-detail and opac-cart
12. look at those and make sure everything looks correct and statuses are properly reflected
Comment 6 Lucas Gass 2021-07-31 13:44:00 UTC
(In reply to Nick Clemens from comment #4)
> This patch also affects the details page on the opac, and the cart
> 
> Before this patch a restricted item shows as:
> Available (Restricted Access)
> 
> After it is:
> Restricted Access

Thanks Nick, I erroneously set the itemavailable flag to 0 for restricted items. They should be considered available. Reset the status of this one to NSO.
Comment 7 Kelly McElligott 2021-08-10 15:53:10 UTC
I have signed off on this : Kelly McElligott
kelly@bywatersolutions.com
Comment 8 Martin Renvoize 2021-09-27 09:56:20 UTC
I noticed this the other day.. should we also be falling back to item-type level not for loan values when the local not for loan is not set or set to allow loans.. which value should take precedence if both are set?

Otherwise, this looks pretty reasonable to me.
Comment 9 Katrin Fischer 2021-09-27 19:19:10 UTC
(In reply to Martin Renvoize from comment #8)
> I noticed this the other day.. should we also be falling back to item-type
> level not for loan values when the local not for loan is not set or set to
> allow loans.. which value should take precedence if both are set?
> 
> Otherwise, this looks pretty reasonable to me.

Not sure I understand the question correctly, do you mean item vs. record leven not for loan? Then I think if both are set, we should use the description from item level. To me it makes sense that the more specific should win.