Bugzilla – Attachment 33526 Details for
Bug 12778
Regression: Item lost status doesn't show in list of checkouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12778 - Regression: Item lost status doesn't show in list of checkouts
Bug-12778---Regression-Item-lost-status-doesnt-sho.patch (text/plain), 3.07 KB, created by
Kyle M Hall (khall)
on 2014-11-13 18:05:43 UTC
(
hide
)
Description:
Bug 12778 - Regression: Item lost status doesn't show in list of checkouts
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-11-13 18:05:43 UTC
Size:
3.07 KB
patch
obsolete
>From 5454de9ca0acb602c8d7145d04c43414091ef9aa Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 13 Nov 2014 12:03:42 -0500 >Subject: [PATCH] Bug 12778 - Regression: Item lost status doesn't show in list of checkouts > >When using the longoverdue script it's possible that items marked lost >remain on the patron account. I think it's important for staff to see >that some items are marked lost - currently the list of checkouts >doesn't show any sign of the lost status. > >Test Plan: >1) Find a patron with a checked out lost item >2) Note the lost status is not displayed in the checkouts table >3) Apply this patch >4) Refresh the page, note the lost status now displays >--- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 12 +++++++++--- > svc/checkouts | 7 +++++-- > 2 files changed, 14 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index e333776..9e58d21 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -183,11 +183,17 @@ $(document).ready(function() { > { > "iDataSort": 1, // Sort on hidden unformatted date due column > "mDataProp": function( oObj ) { >+ var due = oObj.date_due_formatted; >+ > if ( oObj.date_due_overdue ) { >- return "<span class='overdue'>" + oObj.date_due_formatted + "</span>"; >- } else { >- return oObj.date_due_formatted; >+ due = "<span class='overdue'>" + due + "</span>"; > } >+ >+ if ( oObj.lost ) { >+ due += "<span class='lost'>" + oObj.lost + "</span>"; >+ } >+ >+ return due; > } > }, > { >diff --git a/svc/checkouts b/svc/checkouts >index 9dc4881..7ac848e 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -25,8 +25,8 @@ use JSON qw(to_json); > > use C4::Auth qw(check_cookie_auth); > use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue ); >-use C4::Circulation >- qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate); >+use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate); >+use C4::Koha qw(GetAuthorisedValueByCode); > use C4::Context; > > use Koha::DateUtils; >@@ -86,6 +86,8 @@ my $sql = ' > firstname, > cardnumber, > >+ itemlost, >+ > DATEDIFF( issuedate, CURRENT_DATE() ) AS not_issued_today > FROM issues > LEFT JOIN items USING ( itemnumber ) >@@ -175,6 +177,7 @@ while ( my $c = $sth->fetchrow_hashref() ) { > GetMarcBiblio( $c->{biblionumber} ), > GetFrameworkCode( $c->{biblionumber} ) > ), >+ lost => GetAuthorisedValueByCode( 'LOST', $c->{itemlost} ), > borrower => { > surname => $c->{surname}, > firstname => $c->{firstname}, >-- >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 12778
:
33526
|
33566
|
33567
|
33587