Bugzilla – Attachment 33525 Details for
Bug 13195
Regression: Circulation checkouts table no longer shows item type description
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13195 - Regression: Circulation checkouts table no longer shows item type description
Bug-13195---Regression-Circulation-checkouts-table.patch (text/plain), 3.92 KB, created by
Kyle M Hall (khall)
on 2014-11-13 17:06:10 UTC
(
hide
)
Description:
Bug 13195 - Regression: Circulation checkouts table no longer shows item type description
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-11-13 17:06:10 UTC
Size:
3.92 KB
patch
obsolete
>From 0216d4e19e85714d3a37cf71c4e451677240ecc0 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 13 Nov 2014 11:04:17 -0500 >Subject: [PATCH] Bug 13195 - Regression: Circulation checkouts table no longer shows item type description > >Another regression caused by Bug 11703: The list of checkouts on the >circulation and patron detail page shows item type codes instead of the >full description. > >Test Plan: >1) View a patron's checkouts, note the Item type column displays the > code rather than the description. >2) Apply this patch >3) Refresh the page, note the description is now displayed >--- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 2 +- > svc/checkouts | 20 ++++++++++++++------ > 2 files changed, 15 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index dbb652d..c538ea3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -235,7 +235,7 @@ $(document).ready(function() { > return title; > } > }, >- { "mDataProp": "itemtype" }, >+ { "mDataProp": "itemtype_description" }, > { "mDataProp": "issuedate_formatted" }, > { "mDataProp": "branchname" }, > { "mDataProp": "itemcallnumber" }, >diff --git a/svc/checkouts b/svc/checkouts >index 9dc4881..a3b9717 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -46,9 +46,12 @@ my @sort_columns = qw/date_due title itype issuedate branchcode itemcallnumber/; > my @borrowernumber = $input->param('borrowernumber'); > my $offset = $input->param('iDisplayStart'); > my $results_per_page = $input->param('iDisplayLength') || -1; >-my $sorting_column = $sort_columns[ $input->param('iSortCol_0') ] >- || 'issuedate'; >-my $sorting_direction = $input->param('sSortDir_0') eq 'asc' ? 'asc' : 'desc'; >+ >+my $sorting_column = $input->param('iSortCol_0') || q{}; >+$sorting_column = ( $sorting_column && $sort_columns[$sorting_column] ) ? $sort_columns[$sorting_column] : 'issuedate'; >+ >+my $sorting_direction = $input->param('sSortDir_0') || q{}; >+$sorting_direction = $sorting_direction eq 'asc' ? 'asc' : 'desc'; > > $results_per_page = undef if ( $results_per_page == -1 ); > >@@ -78,8 +81,10 @@ my $sql = ' > issues.branchcode, > branchname, > >- itype, >- itemtype, >+ items.itype, >+ itemtype_item.description AS itype_description, >+ biblioitems.itemtype, >+ itemtype_bib.description AS itemtype_description, > > borrowernumber, > surname, >@@ -93,6 +98,8 @@ my $sql = ' > LEFT JOIN biblioitems USING ( biblionumber ) > LEFT JOIN borrowers USING ( borrowernumber ) > LEFT JOIN branches ON ( issues.branchcode = branches.branchcode ) >+ LEFT JOIN itemtypes itemtype_bib ON ( biblioitems.itemtype = itemtype_bib.itemtype ) >+ LEFT JOIN itemtypes itemtype_item ON ( items.itype = itemtype_item.itemtype ) > WHERE borrowernumber > '; > >@@ -120,7 +127,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > my ( $can_renew, $can_renew_error ) = > CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} ); > my $can_renew_date = >- $can_renew_error eq 'too_soon' >+ $can_renew_error && $can_renew_error eq 'too_soon' > ? output_pref( > { > dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ), >@@ -138,6 +145,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > author => $c->{author}, > barcode => $c->{barcode}, > itemtype => $item_level_itypes ? $c->{itype} : $c->{itemtype}, >+ itemtype_description => $item_level_itypes ? $c->{itype_description} : $c->{itemtype_description}, > itemnotes => $c->{itemnotes}, > branchcode => $c->{branchcode}, > branchname => $c->{branchname}, >-- >1.7.2.5
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 13195
:
33525
|
33550
|
33585