On the OPAC search results page issued (checked out) items still show as "Availability: Items available: (1)," when not logged in. When logged in they displays correctly as " Availability: No items available: Issued (1),". The items show correctly as issued in the details page regardless of whether the user is logged in or not and display correctly in the staff client.
(In reply to James from comment #0) > On the OPAC search results page issued (checked out) items still show as > "Availability: Items available: (1)," when not logged in. When logged in > they displays correctly as " Availability: No items available: Issued (1),". > The items show correctly as issued in the details page regardless of whether > the user is logged in or not and display correctly in the staff client. hmm.. i think this problem was caused by bug 17556 ? there seems to be an odd logic error that says an item can only have an 'onloan' status.. if a user is logged in 2094 my $userenv = C4::Context->userenv; 2095 if ( $item->{onloan} 2096 && $userenv 2097 && $userenv->{number} 2098 && !( Koha::Patrons->find($userenv->{number})->category->hidelostitems && $item->{itemlost} ) ) 2099 {
i'll upload a quick patch for this soon...
Created attachment 70094 [details] pic
(In reply to James from comment #0) > On the OPAC search results page issued (checked out) items still show as > "Availability: Items available: (1)," when not logged in. When logged in > they displays correctly as " Availability: No items available: Issued (1),". the workaround until a patch is pushed, is to set the following sysprefs to 'default' , (ie: use XSLT) - OPACXSLTResultsDisplay - XSLTResultsDisplay pic attached
Created attachment 70095 [details] [review] Bug 19870: Loaned items show as available unless logged in here's a quick fix to the problem (on 17.05.00 and up) 1/ set OPACXSLTResultsDisplay = ''; 2/ log out from opac 3/ search for a title in opac, see item is available in search results 4/ check out item 5/ search for a title in opac, see item is still available?1 6/ apply patch 7/ search for an title in opac, see item is now unavailable we still need a .t/test file for resultsSearch(), but that might be a job for another day...
I got this after applying patch and searching for an item: syntax error at /inlibro/git/koha-v1605-dev-inlibro/C4/Search.pm line 2128, near "}"
The patch was still in need signoff, I turn it to failed QA. I had same type of error : Software error: syntax error at /home/koha/src/C4/Search.pm line 2128, near "}" Global symbol "$items_count" requires explicit package name (did you forget to declare "my $items_count"?) at /home/koha/src/C4/Search.pm line 2225. Global symbol "$hideatopac_count" requires explicit package name (did you forget to declare "my $hideatopac_count"?) at /home/koha/src/C4/Search.pm line 2225. 2265. blablablabla ..... Compilation failed in require at /home/koha/src/opac/opac-search.pl line 47. BEGIN failed--compilation aborted at /home/koha/src/opac/opac-search.pl line 47.
Created attachment 77593 [details] [review] Bug 19870: Loaned items show as available unless logged in small typo fix
The display I have with/without applying the patch is the same, whatever I'm locked or not. Maybe I misunderstood something and looked on the wrong place. Can you please add some screenshots to be sure ?
I can't reproduce this bug either. Besides, the non-XSLT view is deprecated.
(In reply to Owen Leonard from comment #10) > I can't reproduce this bug either. Besides, the non-XSLT view is deprecated. The non-XSLT view has since been removed. Closing WONTFIX.