Bugzilla – Attachment 106529 Details for
Bug 25868
Transfers page must show effective itemtype
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25868: Fix tansfers page to show effective itemtype
Bug-25868-Fix-tansfers-page-to-show-effective-item.patch (text/plain), 9.87 KB, created by
Katrin Fischer
on 2020-07-04 22:52:13 UTC
(
hide
)
Description:
Bug 25868: Fix tansfers page to show effective itemtype
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-07-04 22:52:13 UTC
Size:
9.87 KB
patch
obsolete
>From b5cf067802da99f3b70a3ae23eb1e4c8d93d8166 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 24 Jun 2020 17:05:30 +0200 >Subject: [PATCH] Bug 25868: Fix tansfers page to show effective itemtype > >In transfers page /cgi-bin/koha/circ/branchtransfers.pl : >Itemtype is always from biblioitems.itemtype, regardless of system preference item-level_itypes. > >Patch also changes template to use the object Koha::Item. > >Patch also fixes a small typo : closed <form> tag. > >Test plan : >1) Test with both values of system preference 'item-level_itypes' >2) Go to Circulation > Transfert >3) Enter a barcode >4) Enter another barcode >5) Check you see in table all datas and that 'Item type' is correct > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/branchtransfers.pl | 44 ++++++---------------- > .../prog/en/modules/circ/branchtransfers.tt | 28 ++++++++------ > 2 files changed, 28 insertions(+), 44 deletions(-) > >diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl >index 4ed1fb3c34..8cd01d58bd 100755 >--- a/circ/branchtransfers.pl >+++ b/circ/branchtransfers.pl >@@ -131,50 +131,30 @@ if ($barcode) { > my $item = Koha::Items->find({ barcode => $barcode }); > $found = $messages->{'ResFound'}; > if ($transferred) { >- my %item; >- my $biblio = $item->biblio; >+ my %trsfitem; > my $frbranchcd = C4::Context->userenv->{'branch'}; >- $item{'biblionumber'} = $item->biblionumber; >- $item{'itemnumber'} = $item->itemnumber; >- $item{'title'} = $biblio->title; >- $item{'author'} = $biblio->author; >- $item{'itemtype'} = $biblio->biblioitem->itemtype; >- $item{'ccode'} = $item->ccode; >- $item{'itemcallnumber'} = $item->itemcallnumber; >- my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); >- $item{'location'} = $av->count ? $av->next->lib : ''; >- $item{counter} = 0; >- $item{barcode} = $barcode; >- $item{frombrcd} = $frbranchcd; >- $item{tobrcd} = $tobranchcd; >- push( @trsfitemloop, \%item ); >+ $trsfitem{item} = $item; >+ $trsfitem{counter} = 0; >+ $trsfitem{frombrcd} = $frbranchcd; >+ $trsfitem{tobrcd} = $tobranchcd; >+ push( @trsfitemloop, \%trsfitem ); > } > } > > foreach ( $query->param ) { > (next) unless (/bc-(\d*)/); > my $counter = $1; >- my %item; >+ my %trsfitem; > my $bc = $query->param("bc-$counter"); > my $frbcd = $query->param("fb-$counter"); > my $tobcd = $query->param("tb-$counter"); > $counter++; >- $item{counter} = $counter; >- $item{barcode} = $bc; >- $item{frombrcd} = $frbcd; >- $item{tobrcd} = $tobcd; >+ $trsfitem{counter} = $counter; >+ $trsfitem{frombrcd} = $frbcd; >+ $trsfitem{tobrcd} = $tobcd; > my $item = Koha::Items->find({ barcode => $bc }); >- my $biblio = $item->biblio; >- $item{'biblionumber'} = $item->biblionumber; >- $item{'itemnumber'} = $item->itemnumber; >- $item{'title'} = $biblio->title; >- $item{'author'} = $biblio->author; >- $item{'itemtype'} = $biblio->biblioitem->itemtype; >- $item{'ccode'} = $item->ccode; >- $item{'itemcallnumber'} = $item->itemcallnumber; >- my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $item->location }); >- $item{'location'} = $av->count ? $av->next->lib : ''; >- push( @trsfitemloop, \%item ); >+ $trsfitem{item} = $item; >+ push( @trsfitemloop, \%trsfitem ); > } > > my $itemnumber; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >index 9b3f6a2793..5eb69ed385 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt >@@ -40,7 +40,7 @@ > <td> > <form method="post" name="mainform" id="mainform" action="branchtransfers.pl"> > [% FOREACH trsfitemloo IN trsfitemloop %] >- <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" /> >+ <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" /> > <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" /> > <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" /> > [% END %] >@@ -65,7 +65,7 @@ > <td> > <form method="post" name="mainform" id="mainform" action="branchtransfers.pl"> > [% FOREACH trsfitemloo IN trsfitemloop %] >- <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" /> >+ <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" /> > <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" /> > <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" /> > [% END %] >@@ -82,11 +82,11 @@ > <tr> > <th>Ignore and return to transfers: </th> > <td> >- <form method="post" name="mainform" id="mainform" action="branchtransfers.pl" /> >+ <form method="post" name="mainform" id="mainform" action="branchtransfers.pl"> > <input type="hidden" name="tobranchcd" value="[% tobranchcd | html %]" /> > <input type="hidden" name="barcode" /> > [% FOREACH trsfitemloo IN trsfitemloop %] >- <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" /> >+ <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" /> > <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" /> > <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" /> > [% END %] >@@ -164,7 +164,7 @@ > </fieldset> > <input type="hidden" name="tobranchcd" value="[% tobrancd | html %]" /> > [% FOREACH trsfitemloo IN trsfitemloop %] >- <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.barcode | html %]" /> >+ <input type="hidden" name="bc-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.item.barcode | html %]" /> > <input type="hidden" name="fb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.frombrcd | html %]" /> > <input type="hidden" name="tb-[% trsfitemloo.counter | html %]" value="[% trsfitemloo.tobrcd | html %]" /> > [% END %] >@@ -186,13 +186,17 @@ > </tr> > [% FOREACH trsfitemloo IN trsfitemloop %] > <tr> >- <td class="tf-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]">[% trsfitemloo.title | html %]</a></td> >- <td class="tf-author">[% trsfitemloo.author | html %]</td> >- <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]&itemnumber=[% trsfitemloo.itemnumber | uri %]#item[% trsfitemloo.itemnumber | uri %]">[% trsfitemloo.barcode | html %]</a></td> >- <td class="tf-location"><span class="shelvingloc">[% trsfitemloo.location | html %]</span></td> >- <td class="tf-itemcallnumber">[% trsfitemloo.itemcallnumber | html %]</td> >- <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %]</td> >- <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %]</td> >+ <td class="tf-title"> >+ [% INCLUDE 'biblio-default-view.inc' biblionumber = trsfitemloo.item.biblionumber %] >+ [% INCLUDE 'biblio-title.inc' biblio=trsfitemloo.item.biblio %] >+ </a> >+ </td> >+ <td class="tf-author">[% trsfitemloo.item.biblio.author | html %]</td> >+ <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.item.biblionumber | uri %]&itemnumber=[% trsfitemloo.item.itemnumber | uri %]#item[% trsfitemloo.item.itemnumber | uri %]">[% trsfitemloo.item.barcode | html %]</a></td> >+ <td class="tf-location"><span class="shelvingloc">[% AuthorisedValues.GetByCode( 'LOC', trsfitemloo.item.location ) | html %]</span></td> >+ <td class="tf-itemcallnumber">[% trsfitemloo.item.itemcallnumber | html %]</td> >+ <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.item.effective_itemtype ) | html %]</td> >+ <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.item.ccode ) | html %]</td> > <td class="tf-destination">[% Branches.GetName( trsfitemloo.tobrcd ) | html %]</td> > </tr> > [% END %] >-- >2.11.0
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 25868
:
106256
|
106360
|
106380
|
106385
| 106529