Bugzilla – Attachment 74878 Details for
Bug 19972
Holds to pull should honor syspref "item-level_itypes"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19972: Make holds to pull list honors item-level_itypes syspref
Bug-19972-Make-holds-to-pull-list-honors-item-leve.patch (text/plain), 5.44 KB, created by
Victor Grousset/tuxayo
on 2018-04-26 12:04:45 UTC
(
hide
)
Description:
Bug 19972: Make holds to pull list honors item-level_itypes syspref
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2018-04-26 12:04:45 UTC
Size:
5.44 KB
patch
obsolete
>From dc4183552193e5c36a3f2e048acf92db133f9cea Mon Sep 17 00:00:00 2001 >From: Victor Grousset <victor.grousset@biblibre.com> >Date: Tue, 16 Jan 2018 10:06:20 +0100 >Subject: [PATCH] Bug 19972: Make holds to pull list honors item-level_itypes > syspref > >And reflect that in the UI strings + variable names > >Test plan: >1. Set syspref "item-level_itypes" to "specific item" >2. Create a hold on a record with one item >3. Change the document type of the item >4. Check that the item edition page and the record page show 2 different > types. >5. Go to /cgi-bin/koha/circ/pendingreserves.pl >6. Check that the displayed type is the item one >7. Set syspref "item-level_itypes" to "biblio record" >8. Go to /cgi-bin/koha/circ/pendingreserves.pl >9. See that the displayed type is the item one. When the sysopref says > "record" > This is the bug. >10. Apply this patch >11. Go to /cgi-bin/koha/circ/pendingreserves.pl >12. See that the displayed type now follows the syspref >13. Set syspref "item-level_itypes" to "specific item" >14. Go to /cgi-bin/koha/circ/pendingreserves.pl >15. See that the displayed type still follows the syspref > >Signed-off-by: Lucie Gay <lucie.gay@ens-paris-saclay.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > circ/pendingreserves.pl | 9 ++++++--- > .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 10 +++++----- > 2 files changed, 11 insertions(+), 8 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 5e6418b..2602daf 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -168,6 +168,8 @@ if ($enddate_iso) { > push @query_params, $enddate_iso; > } > >+my $item_type = C4::Context->preference('item-level_itypes') ? "items.itype" : "biblioitems.itemtype"; >+ > my $strsth = > "SELECT min(reservedate) as l_reservedate, > reserves.reserve_id, >@@ -180,8 +182,8 @@ my $strsth = > reserves.itemnumber, > items.holdingbranch, > items.homebranch, >- GROUP_CONCAT(DISTINCT items.itype >- ORDER BY items.itemnumber SEPARATOR '|') l_itype, >+ GROUP_CONCAT(DISTINCT $item_type >+ ORDER BY items.itemnumber SEPARATOR '|') l_item_type, > GROUP_CONCAT(DISTINCT items.location > ORDER BY items.itemnumber SEPARATOR '|') l_location, > GROUP_CONCAT(DISTINCT items.itemcallnumber >@@ -199,6 +201,7 @@ my $strsth = > FROM reserves > LEFT JOIN items ON items.biblionumber=reserves.biblionumber > LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber >+ LEFT JOIN biblioitems ON biblio.biblionumber=biblioitems.biblionumber > LEFT JOIN branchtransfers ON items.itemnumber=branchtransfers.itemnumber > LEFT JOIN issues ON items.itemnumber=issues.itemnumber > LEFT JOIN borrowers ON reserves.borrowernumber=borrowers.borrowernumber >@@ -249,7 +252,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > count => $data->{icount}, > rcount => $data->{rcount}, > pullcount => $data->{icount} <= $data->{rcount} ? $data->{icount} : $data->{rcount}, >- itypes => [split('\|', $data->{l_itype})], >+ itemTypes => [split('\|', $data->{l_item_type})], > locations => [split('\|', $data->{l_location})], > reserve_id => $data->{reserve_id}, > holdingbranch => $data->{holdingbranch}, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 5072c8d..ea0eace 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -60,7 +60,7 @@ > <th>Available call numbers</th> > <th>Available copy numbers</th> > <th>Available enumeration</th> >- <th class="string-sort">Available itypes</th> >+ <th class="string-sort">Available item types</th> > <th class="string-sort">Available locations</th> > <th class="title-string">Earliest hold date</th> > <th>Action</th> >@@ -96,8 +96,8 @@ > <td><p>[% reserveloo.copyno %]</p></td> > <td><p>[% reserveloo.enumchron %]</p></td> > <td> >- [% FOREACH itype IN reserveloo.itypes %] >- [% ItemTypes.GetDescription( itype ) %] >+ [% FOREACH itemType IN reserveloo.itemTypes %] >+ [% ItemTypes.GetDescription( itemType ) %] > [% END %] > </td> > <td> >@@ -149,7 +149,7 @@ > <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td> > <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td> > <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td> >- <td id="itypefilter"></td> >+ <td id="type-filter"></td> > <td id="locationfilter"></td> > <td></td> > <td></td> >@@ -245,7 +245,7 @@ > holdst.fnFilter( filter_value, 5, true ); > }); > }); >- $("#itypefilter").each( function () { >+ $("#type-filter").each( function () { > $(this).html( createSelect( holdst.fnGetColumnData(9) ) ); > $('select', this).change( function () { > holdst.fnFilter( $(this).val(), 9 ); >-- >2.7.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 19972
:
70549
|
72804
|
74706
|
74707
| 74878 |
74879