This is a display issue, but marking as major since it affects a basic functionality in the OPAC: 1) Edit any item, item type should be for loan, so not set to reference. 2) Set Not for loan status to "not for loan". 3) Go to the staff detail page: 4) Verify it displays as: Not for loan (Not For Loan) Available The available should not be there! 5) Go to the OPAC detail page: 6) Verifiy the status displays as: Available This should display the not for loan status!
Looks like it is caused by Bug 31321
Created attachment 144542 [details] [review] Bug 32445: Fix display of 'not for loan' items in staff test plan : 1) Edit any item, item type should be for loan, so not set to reference. 2) Set Not for loan status to "not for loan". 3) Go to the staff detail page: => Without patch it displays as: Not for loan (Not For Loan) Available => With patch it displays as: Not for loan (Not For Loan)
Hi Frido, did you see the bug in OPAC is worse? Not displaying at all.
For OPAC, I tried to fix : koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc You see there : item.itemnotforloan and item.notforloanvalueopac But I get lost with : NOT ( item.isa('Koha::Item') ) Is is still valid ?
Ah its more a dependency on Bug 27272
Does Bug 29198 seem like a duplicate of this one?
(In reply to Fridolin Somers from comment #4) > For OPAC, I tried to fix : > koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc > koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status-schema-org.inc > > You see there : > item.itemnotforloan and item.notforloanvalueopac > > But I get lost with : > NOT ( item.isa('Koha::Item') ) > Is is still valid ? Yes, it's definitely valid. We don't always send a Koha::Item For instance in opac/opac-basket.pl 97 my $items = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed; 137 $dat->{ITEM_RESULTS} = $items;
(In reply to Lucas Gass from comment #6) > Does Bug 29198 seem like a duplicate of this one? I don't think so. Here it's a regression from bug 27272.
This is a real bad bug - no chance to fix for 22.11.01?
Yikes, where are we at with this one?
(In reply to David Cook from comment #10) > Yikes, where are we at with this one? Needing someone to assign the bug and write patches.
Created attachment 144926 [details] [review] Bug 32445: Fix availability display on opac-course-details
Created attachment 144927 [details] [review] Bug 32445: Fix availability display on opac-basket Also fix holding branch Will display an empty span if no location, big deal?
Created attachment 144928 [details] [review] Bug 32445: Fix notforloan display
Created attachment 144929 [details] [review] Bug 32445: Remove non-Koha::Item support from item-status.inc
Created attachment 144930 [details] [review] Bug 32445: include item-status-schema-org.inc Can be discussed, but it will prevent to fetch several times the same related objects
This patch set suggests to remove the non-Koha::Item support from item-status.inc in order to make it more reliable. We are removing some specific code from pl scripts (opac-basket.pl, opac-course-details.pl) and pass a Koha::Item to item-status.inc where it was not the case already. It's hard to provide a full test plan. You should mostly focus on item availability in opac-detail, opac-basket and opac-course-details.
I've tested, and this now fixes the display for: - the record in the staff interface and OPAC - the cart in the OPAC For course reserves, the status is shown as: - OPAC: Programming error, item-status.inc must be called with a Koha::Item object. - Staff interface: Available How I tested (using KTD): 1. Replicated the issue (as per the bug description), and in addition I added a record/item to a course reserve and the cart (for both the OPAC and staff interface). 2. Applied the patch, flush_memcached, restart_all and cleared the browser cache. 3. Refreshed the pages. 4. Results: - this worked fine for the record/item in the staff interface and OPAC; and the cart in the OPAC - Didn't work for course reserves: the status in the staff interface shows as 'Available' (I guess this is right as it is available but can't be borrowed?), and in the OPAC shows as 'Programming error, item-status.inc must be called with a Koha::Item object.'
Created attachment 144971 [details] [review] Bug 32445: (follow-up) Fix availability display on opac-course-details This is reverting a change made by commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9 Bug 19532: Recalls on OPAC Is it correct? I let a comment on bug 19532 comment 928 to ask for clarification.
The changes made to opac-course-details seem to fix the availability there, that could have been broken by bug 19532.
Hi David, I fixed the "programming error", and the availability display at the OPAC for course reserves. But I think we need a separate bug to deal with it properly (as it exists in 22.05).
(In reply to Jonathan Druart from comment #21) > Hi David, > I fixed the "programming error", and the availability display at the OPAC > for course reserves. But I think we need a separate bug to deal with it > properly (as it exists in 22.05). Thanks Jonathan! An additional nuance for course reserves: - If I add an item to course reserves using an item barcode, everything works fine and there is no error displayed. - However, if I add it using the bibliographic number (such as 262), then I get the same error message as before. - In addition, if I add more items to course reserves after adding one using the biblio number, they are displayed on the staff interface list, but don't display in the OPAC list (hope this makes sense). David
Created attachment 144978 [details] [review] Bug 32445: Deal with biblio course reserve
(In reply to David Nind from comment #22) Should be fixed now!
Created attachment 144987 [details] [review] Bug 32445: Fix display of 'not for loan' items in staff test plan : 1) Edit any item, item type should be for loan, so not set to reference. 2) Set Not for loan status to "not for loan". 3) Go to the staff detail page: => Without patch it displays as: Not for loan (Not For Loan) Available => With patch it displays as: Not for loan (Not For Loan) Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144988 [details] [review] Bug 32445: Fix availability display on opac-course-details Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144989 [details] [review] Bug 32445: Fix availability display on opac-basket Also fix holding branch Will display an empty span if no location, big deal? Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144990 [details] [review] Bug 32445: Fix notforloan display Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144991 [details] [review] Bug 32445: Remove non-Koha::Item support from item-status.inc Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144992 [details] [review] Bug 32445: include item-status-schema-org.inc Can be discussed, but it will prevent to fetch several times the same related objects Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144993 [details] [review] Bug 32445: (follow-up) Fix availability display on opac-course-details This is reverting a change made by commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9 Bug 19532: Recalls on OPAC Is it correct? I let a comment on bug 19532 comment 928 to ask for clarification. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 144994 [details] [review] Bug 32445: Deal with biblio course reserve Signed-off-by: David Nind <david@davidnind.com>
Created attachment 145004 [details] [review] Bug 32445: Fix display of 'not for loan' items in staff test plan : 1) Edit any item, item type should be for loan, so not set to reference. 2) Set Not for loan status to "not for loan". 3) Go to the staff detail page: => Without patch it displays as: Not for loan (Not For Loan) Available => With patch it displays as: Not for loan (Not For Loan) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145005 [details] [review] Bug 32445: Fix availability display on opac-course-details Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145006 [details] [review] Bug 32445: Fix availability display on opac-basket Also fix holding branch Will display an empty span if no location, big deal? Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145007 [details] [review] Bug 32445: Fix notforloan display Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145008 [details] [review] Bug 32445: Remove non-Koha::Item support from item-status.inc Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145009 [details] [review] Bug 32445: include item-status-schema-org.inc Can be discussed, but it will prevent to fetch several times the same related objects Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145010 [details] [review] Bug 32445: (follow-up) Fix availability display on opac-course-details This is reverting a change made by commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9 Bug 19532: Recalls on OPAC Is it correct? I let a comment on bug 19532 comment 928 to ask for clarification. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 145011 [details] [review] Bug 32445: Deal with biblio course reserve Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice cleanup here Jonathan. All working as expected, no regressions found in testing. QA scripts happy too.. Passing QA
Created attachment 145014 [details] [review] Bug 32445: Fix display of 'not for loan' items in staff test plan : 1) Edit any item, item type should be for loan, so not set to reference. 2) Set Not for loan status to "not for loan". 3) Go to the staff detail page: => Without patch it displays as: Not for loan (Not For Loan) Available => With patch it displays as: Not for loan (Not For Loan) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145015 [details] [review] Bug 32445: Fix availability display on opac-course-details Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145016 [details] [review] Bug 32445: Fix availability display on opac-basket Also fix holding branch Will display an empty span if no location, big deal? Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145017 [details] [review] Bug 32445: Fix notforloan display Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145018 [details] [review] Bug 32445: Remove non-Koha::Item support from item-status.inc Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145019 [details] [review] Bug 32445: include item-status-schema-org.inc Can be discussed, but it will prevent to fetch several times the same related objects Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145020 [details] [review] Bug 32445: (follow-up) Fix availability display on opac-course-details This is reverting a change made by commit 52b5cdf79b53eb29173e92a7dfe0f76df135e7d9 Bug 19532: Recalls on OPAC Is it correct? I let a comment on bug 19532 comment 928 to ask for clarification. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 145021 [details] [review] Bug 32445: Deal with biblio course reserve Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Thanks, Jonathan. This ended up being a nice cleanup along with the fix!
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Doesn't apply cleanly to 22.05.x, no backport. If needed please rebase