Bugzilla – Attachment 138817 Details for
Bug 31309
Remove GetItemsInfo from basket/sendbasket
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31309: Remove GetItemsInfo from basket/sendbasket
Bug-31309-Remove-GetItemsInfo-from-basketsendbaske.patch (text/plain), 3.03 KB, created by
Jonathan Druart
on 2022-08-08 14:46:07 UTC
(
hide
)
Description:
Bug 31309: Remove GetItemsInfo from basket/sendbasket
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-08 14:46:07 UTC
Size:
3.03 KB
patch
obsolete
>From 1befae62d65979a3ffa5533762b059229fd72be2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 2 Jun 2022 11:33:40 +0200 >Subject: [PATCH] Bug 31309: Remove GetItemsInfo from basket/sendbasket > >Why are we display with $raw? >Why are we display the location code instead of the AV's lib? > >Bug 27272 is going to remove C4::Items::GetItemsInfo in favour of Koha::Items->search_ordered. > >Here we are going to deal with basket/sendbasket > >Test plan: >List items on the modified view and confirm that all the info is >displayed correctly >--- > basket/sendbasket.pl | 5 +---- > koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt | 5 +++-- > 2 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl >index c5bf9822fb6..ec9e1a2463d 100755 >--- a/basket/sendbasket.pl >+++ b/basket/sendbasket.pl >@@ -25,7 +25,6 @@ use Try::Tiny qw( catch try ); > use C4::Biblio qw( > GetMarcSubjects > ); >-use C4::Items qw( GetItemsInfo ); > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_and_exit output_html_with_http_headers ); > use C4::Templates; >@@ -76,8 +75,6 @@ if ( $email_add ) { > my $marcauthorsarray = $biblio->get_marc_authors; > my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); > >- my @items = GetItemsInfo( $biblionumber ); >- > my $hasauthors = 0; > if($dat->{'author'} || @$marcauthorsarray) { > $hasauthors = 1; >@@ -88,7 +85,7 @@ if ( $email_add ) { > $dat->{MARCAUTHORS} = $marcauthorsarray; > $dat->{HASAUTHORS} = $hasauthors; > $dat->{'biblionumber'} = $biblionumber; >- $dat->{ITEM_RESULTS} = \@items; >+ $dat->{ITEM_RESULTS} = $biblio->items->search_ordered; > > $iso2709 .= $record->as_usmarc(); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt >index a39f377914f..c6082787ccb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt >@@ -1,6 +1,7 @@ > [% USE raw %] > [% USE HtmlToText %] > [% USE Koha %] >+[% USE Branches %] > > <SUBJECT> > Your cart >@@ -139,11 +140,11 @@ Your cart > In online catalog: [% OPACBaseURL | $raw %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% BIBLIO_RESULT.biblionumber | html %] > </p> > [% END %] >- [% IF ( BIBLIO_RESULT.ITEM_RESULTS.size ) %] >+ [% IF ( BIBLIO_RESULT.ITEM_RESULTS.count ) %] > <p>Items: > <ul> > [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]<li> >- [% ITEM_RESULT.branchname | $raw %] >+ [% Branches.GetName(ITEM_RESULT.holdingbranch) | $raw %] > [% ITEM_RESULT.location | $raw %] > [% IF ITEM_RESULT.itemcallnumber %]([% ITEM_RESULT.itemcallnumber | $raw %])[% END %] > [% ITEM_RESULT.barcode | $raw %] >-- >2.25.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 31309
:
138817
|
138843
|
139091