Bugzilla – Attachment 116930 Details for
Bug 18912
Show more item information when using itemBarcodeFallbackSearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18912: Display more info when using itemBarcodeFallbackSearch
Bug-18912-Display-more-info-when-using-itemBarcode.patch (text/plain), 5.98 KB, created by
Jonathan Druart
on 2021-02-17 09:04:00 UTC
(
hide
)
Description:
Bug 18912: Display more info when using itemBarcodeFallbackSearch
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-02-17 09:04:00 UTC
Size:
5.98 KB
patch
obsolete
>From 82dfef14d73ddd84d58e2dceb288951adb3fbaae Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Feb 2021 10:01:00 +0100 >Subject: [PATCH] Bug 18912: Display more info when using > itemBarcodeFallbackSearch > >Using itemBarcodeFallbackSearch entering a barcode on checkout will do a keyword >search and provide you with a list of items matching the search term for checkout. >This allows checking out items, where there is no barcode in the item (you still need >a dummy barcode in Koha). > >At the moment the table of items to choose from will only chow the title and the dummy barcode. > >In order to make it more useful and easier to identify the correct item, >we should show more information here: > >- callnumber (952$o) >- serial enumeration (952$h) >- copy number (952$t) >- inventory number (952$i) > >(description copier from comment 0) > >Test plan: >- Turn on itemBarcodeFallbackSearch >(If you have ES you need bug 27597) >- Check an item out using "street" or a search that will return several >items >- Note that you have now more info about the items >--- > circ/circulation.pl | 13 +++++-------- > .../prog/en/modules/circ/circulation.tt | 12 ++++++++---- > 2 files changed, 13 insertions(+), 12 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index ee3878ca13..6708427d0e 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -361,21 +361,18 @@ if (@$barcodes) { > > # if multiple hits, offer options to librarian > if ( $total_hits > 0 ) { >- my @options = (); >+ my @barcodes; > foreach my $hit ( @{$results} ) { >- my $chosen = >+ my $chosen = # Maybe easier to retrieve the itemnumber from $hit? > TransformMarcToKoha( C4::Search::new_record_from_zebra('biblioserver',$hit) ); > > # offer all barcodes individually > if ( $chosen->{barcode} ) { >- foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) { >- my %chosen_single = %{$chosen}; >- $chosen_single{barcode} = $barcode; >- push( @options, \%chosen_single ); >- } >+ push @barcodes, sort split(/\s*\|\s*/, $chosen->{barcode}); > } > } >- $template_params->{options} = \@options; >+ my $items = Koha::Items->search({ barcode => {-in => \@barcodes}}); >+ $template_params->{options} = $items; > } > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index a4f7369bb2..c5907e34ae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -446,11 +446,15 @@ > </div> > <div class="modal-body"> > <table class="table_borrowers"> >- [% FOREACH book IN options %] >+ [% FOREACH item IN options %] > <tr> > <td> >- <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber | html %]">[% book.title | html %] <i class="fa fa-window-restore"></i></a> >- [% book.barcode | html %] >+ <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | html %]">[% item.biblio.title | html %] <i class="fa fa-window-restore"></i></a> >+ [% item.barcode | html %] >+ [% IF item.itemcallnumber %]Callnumber: [% item.itemcallnumber %][% END %] >+ [% IF item.copynumber %]Copy number: [% item.copynumber %][% END %] >+ [% IF item.stocknumber %]Inventory number: [% item.stocknumber %][% END %] >+ [% IF item.enumchron %]Serial enumeration: [% item.enumchron %][% END %] > </td> > <td> > <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off"> >@@ -462,7 +466,7 @@ > <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" /> > <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" /> > <input type="hidden" name="branch" value="[% branch | html %]" /> >- <input type="hidden" name="barcode" value="[% book.barcode | html %]" /> >+ <input type="hidden" name="barcode" value="[% item.barcode | html %]" /> > <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" /> > <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" /> > <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button> >-- >2.20.1
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 18912
:
116930
|
116987
|
116988
|
117110
|
117111
|
119075
|
119076
|
119319
|
119420
|
119769
|
119770
|
119771