Bugzilla – Attachment 69937 Details for
Bug 19808
Reviews from deleted patrons make few scripts to explode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl
SIGNED-OFF-Bug-19808-Handle-deleted-reviewers-grac.patch (text/plain), 1.71 KB, created by
Jon Knight
on 2017-12-19 22:38:43 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 19808: Handle deleted reviewers gracefully - reviews/reviewswaiting.pl
Filename:
MIME Type:
Creator:
Jon Knight
Created:
2017-12-19 22:38:43 UTC
Size:
1.71 KB
patch
obsolete
>From eaa4afb8f6b89edb16e201356157dff21cdcb343 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 18 Dec 2017 13:32:19 -0300 >Subject: [PATCH] [SIGNED-OFF] Bug 19808: Handle deleted reviewers gracefully - > reviews/reviewswaiting.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >- Create reviews >- Delete some reviewers >- Go to Home ⺠Tools ⺠Comments ⺠Comments awaiting moderation > >Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> >--- > reviews/reviewswaiting.pl | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > >diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl >index 5284252..82b1234 100755 >--- a/reviews/reviewswaiting.pl >+++ b/reviews/reviewswaiting.pl >@@ -67,14 +67,17 @@ my $reviews = Koha::Reviews->search( > } > )->unblessed; > >-foreach ( @$reviews ) { >- my $borrowernumber = $_->{borrowernumber}; >- my $patron = Koha::Patrons->find( $borrowernumber); >- my $biblio = Koha::Biblios->find( $_->{biblionumber} ); >+for my $review ( @$reviews ) { >+ my $biblio = Koha::Biblios->find( $review->{biblionumber} ); > # setting some borrower info into this hash >- $_->{bibliotitle} = $biblio->title; >- $_->{surname} = $patron->surname; >- $_->{firstname} = $patron->firstname; >+ $review->{bibliotitle} = $biblio->title; >+ >+ my $borrowernumber = $review->{borrowernumber}; >+ my $patron = Koha::Patrons->find( $borrowernumber); >+ if ( $patron ) { >+ $review->{surname} = $patron->surname; >+ $review->{firstname} = $patron->firstname; >+ } > } > > my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status"; >-- >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 19808
:
69824
|
69828
|
69853
|
69854
|
69855
|
69856
|
69926
|
69934
|
69935
|
69936
|
69937
|
69938
|
69989
|
69990
|
69991
|
69992
|
69993