Bugzilla – Attachment 67387 Details for
Bug 19298
allow_onshelf_holds is not calculated correctly in opac-shelves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19298: Placing a hold from a list at the OPAC should respect issuing rules
Bug-19298-Placing-a-hold-from-a-list-at-the-OPAC-s.patch (text/plain), 2.61 KB, created by
Alex Buckley
on 2017-09-27 02:35:53 UTC
(
hide
)
Description:
Bug 19298: Placing a hold from a list at the OPAC should respect issuing rules
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2017-09-27 02:35:53 UTC
Size:
2.61 KB
patch
obsolete
>From cc7eaac5e2918a7355be6f988232326403873755 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 12 Sep 2017 13:03:04 -0300 >Subject: [PATCH] Bug 19298: Placing a hold from a list at the OPAC should > respect issuing rules > >The issuing rule retrieve to know if a hold can be placed on a record of >a list is not correct. > >Test plan: >0/ With item-level_itypes = item level >1/ Define a item.itype=BK and biblioitems.itemtype=CF >2/ Create a default rule to allow on shelf holds >3/ Create a specific rule for CF with on shelf holds="If any >unavailable" >4/ Add this bibliographic record to a list and view the list >=> Without this patch you will not see "Place hold" >=> With this patch applied you will see the "Place hold" button, >respecting the correct issuing rule > >Followed test plan, patches worked as described. > >Note: Just to clarify the test plan slightly in step 4 where it says you will not see 'Place Hold' it means to >the left of the 'Save to another List' link below the item availability >in the opac-shelves.pl page. Not the 'Place hold' button in the grey >page header box. > >Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> >--- > opac/opac-shelves.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl >index e5b9cc6..1feaf57 100755 >--- a/opac/opac-shelves.pl >+++ b/opac/opac-shelves.pl >@@ -29,6 +29,7 @@ use C4::Output; > use C4::Tags qw( get_tags ); > use C4::XSLT; > >+use Koha::Biblios; > use Koha::Biblioitems; > use Koha::Items; > use Koha::ItemTypes; >@@ -272,6 +273,7 @@ if ( $op eq 'view' ) { > my $this_item = GetBiblioData($biblionumber); > my $record = GetMarcBiblio({ biblionumber => $biblionumber }); > my $framework = GetFrameworkCode( $biblionumber ); >+ my $biblio = Koha::Biblios->find( $biblionumber ); > $record_processor->options({ > interface => 'opac', > frameworkcode => $framework >@@ -315,8 +317,11 @@ if ( $op eq 'view' ) { > }); > } > >- $this_item->{allow_onshelf_holds} = C4::Reserves::OnShelfHoldsAllowed($this_item, $patron); >- >+ my $items = $biblio->items; >+ while ( my $item = $items->next ) { >+ $this_item->{allow_onshelf_holds} = C4::Reserves::OnShelfHoldsAllowed($item->unblessed, $patron); >+ last if $this_item->{allow_onshelf_holds}; >+ } > > if ( grep {$_ eq $biblionumber} @cart_list) { > $this_item->{incart} = 1; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19298
:
67116
|
67387
|
68460
|
68461