Bugzilla – Attachment 78173 Details for
Bug 21257
Patrons checkout table throws JS error when location/collection not defined
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21257: Return blank strings instead of null in svc/checkouts
Bug-21257-Return-blank-strings-instead-of-null-in-.patch (text/plain), 1.53 KB, created by
Katrin Fischer
on 2018-08-26 16:38:09 UTC
(
hide
)
Description:
Bug 21257: Return blank strings instead of null in svc/checkouts
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2018-08-26 16:38:09 UTC
Size:
1.53 KB
patch
obsolete
>From 5f953353f44ba94d5dbdd66c5d2a249649560964 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 22 Aug 2018 15:10:38 +0000 >Subject: [PATCH] Bug 21257: Return blank strings instead of null in > svc/checkouts > >To test: >1 - Find an item with no collection or location defined >2 - Check it out to a patron >3 - Note you cannot view the checkouts table >4 - Check the console: TypeError: oObj.collection is null >5 - Apply patch >6 - Restart all the things >7 - Checkouts table should load > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Works as expected! > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > svc/checkouts | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/svc/checkouts b/svc/checkouts >index 9a1b3a5..75fe227 100755 >--- a/svc/checkouts >+++ b/svc/checkouts >@@ -151,12 +151,12 @@ while ( my $c = $sth->fetchrow_hashref() ) { > GetRenewCount( $c->{borrowernumber}, $c->{itemnumber} ); > > my $itemtype = Koha::ItemTypes->find( $item_level_itypes ? $c->{itype} : $c->{itemtype} ); >- my $location; >+ my $location = ""; > if ( $c->{location} ) { > my $av = Koha::AuthorisedValues->search({ category => 'LOC', authorised_value => $c->{location} }); > $location = $av->count ? $av->next->lib : ''; > } >- my $collection; >+ my $collection = ""; > if ( $c->{collection} ) { > my $av = Koha::AuthorisedValues->search({ category => 'CCODE', authorised_value => $c->{collection} }); > $collection = $av->count ? $av->next->lib : ''; >-- >2.1.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 21257
:
78086
|
78145
|
78156
|
78173
|
78174
|
78849
|
78973
|
78991