Bugzilla – Attachment 69837 Details for
Bug 19771
Pending offline circulation actions page will crash on unknown barcode or on payment action
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19771: Fix crashing in pending offline circulation actions list
Bug-19771-Fix-crashing-in-pending-offline-circulat.patch (text/plain), 1.76 KB, created by
Josef Moravec
on 2017-12-17 09:21:34 UTC
(
hide
)
Description:
Bug 19771: Fix crashing in pending offline circulation actions list
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-12-17 09:21:34 UTC
Size:
1.76 KB
patch
obsolete
>From d6f9aa3001863188fcdc3901dfa112209207e9b7 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Sun, 17 Dec 2017 08:53:18 +0000 >Subject: [PATCH] Bug 19771: Fix crashing in pending offline circulation > actions list > >0) Do not apply the patch >1) Add some checkout / checkin actions on existing barcodes, you can use >standalone application, Firefox add-on or built-in offline circulation >client >2) Go to Circulation -> Pending offline circulation actions and you will >see you actions in the table >3) Add some actions with non-exitent barcodes or a payment >4) Go to Circulation -> Pending offline circulation actions - the page >crashes >5) Apply the patch >6) Go to Circulation -> Pending offline circulation actions - the page >is working again >--- > offline_circ/list.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/offline_circ/list.pl b/offline_circ/list.pl >index 5981f35..0641629 100755 >--- a/offline_circ/list.pl >+++ b/offline_circ/list.pl >@@ -46,10 +46,12 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ > my $operations = GetOfflineOperations; > > for (@$operations) { >- my $item = Koha::Items->find({ barcode => $_->{barcode} }); >- my $biblio = $item->biblio; >- $_->{'bibliotitle'} = $biblio->title; >- $_->{'biblionumber'} = $biblio->biblionumber; >+ my $item = $_->{barcode} ? Koha::Items->find({ barcode => $_->{barcode} }) : undef; >+ if ($item) { >+ my $biblio = $item->biblio; >+ $_->{'bibliotitle'} = $biblio->title; >+ $_->{'biblionumber'} = $biblio->biblionumber; >+ } > my $patron = $_->{cardnumber} ? Koha::Patrons->find( { cardnumber => $_->{cardnumber} } ) : undef; > if ($patron) { > $_->{'borrowernumber'} = $patron->borrowernumber; >-- >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 19771
:
69610
|
69837
|
70695
|
70745