Bugzilla – Attachment 119769 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), 6.26 KB, created by
Kyle M Hall (khall)
on 2021-04-16 17:12:34 UTC
(
hide
)
Description:
Bug 18912: Display more info when using itemBarcodeFallbackSearch
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-16 17:12:34 UTC
Size:
6.26 KB
patch
obsolete
>From c6a898d7e03d7af048f6190610d88dc5c122095c 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 > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 44f87b6281..f6dd318f97 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 7fcde8578d..0d4d4d82c9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -480,11 +480,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"> >@@ -496,7 +500,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.24.3 (Apple Git-128)
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