Bugzilla – Attachment 99629 Details for
Bug 12133
Guarantor requirements when registering a patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12133: Fix issue with modify
0001-Bug-12133-Fix-issue-with-modify.patch (text/plain), 1.74 KB, created by
Emmi Takkinen
on 2020-02-26 08:15:31 UTC
(
hide
)
Description:
Bug 12133: Fix issue with modify
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2020-02-26 08:15:31 UTC
Size:
1.74 KB
patch
obsolete
>From a72cfdb0ae137e2546e686b06e42fbfbfdf9df7e Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@outlook.com> >Date: Wed, 19 Feb 2020 10:41:47 +0200 >Subject: [PATCH] Bug 12133: Fix issue with modify > >Child patrons couldn't be modified when guarantor was >patron due missing guarantor_id value. This patch fixes >that. > >To test: >1. Add child patron with syspref ChildNeedsGuarantor and >GuarantorNeedsToBePatron on. >2. Modify patron and save. >3. Error "Child needs guarantor" is raised even if >guarantor exists. >4. Apply patch. >5. Edit again and save. No error should be raised. > >Sponsored-by: Koha-Suomi Oy >--- > members/memberentry.pl | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 50de11ce68..75766d2e29 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -106,12 +106,16 @@ my $userenv = C4::Context->userenv; > > ## Deal with guarantor stuff > $template->param( relationships => scalar $patron->guarantor_relationships ) if $patron; >-my $guarantorinfo = $input->param('guarantorinfo'); >-my $guarantor_id = $input->param('new_guarantor_id'); >+#Either use existing guarantor id or new from params >+my @guarantors = $patron->guarantor_relationships()->guarantors if $patron; >+my $found_guarantor_id; >+foreach my $guarantor (@guarantors){ >+ $found_guarantor_id = $guarantor->id; >+}; >+my $guarantor_id = $input->param('new_guarantor_id') || $found_guarantor_id; > my $guarantor = undef; > $guarantor = Koha::Patrons->find( $guarantor_id ) if $guarantor_id; > $template->param( guarantor => $guarantor ); >- > my @delete_guarantor = $input->multi_param('delete_guarantor'); > foreach my $id ( @delete_guarantor ) { > my $r = Koha::Patron::Relationships->find( $id ); >-- >2.17.1 >
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 12133
:
27517
|
27584
|
33459
|
91482
|
94371
|
94538
|
94544
|
99629
|
113099
|
113100
|
134013
|
134014
|
134015
|
146827
|
147440
|
148058
|
148070
|
152706
|
153082
|
153154
|
154300
|
154316
|
156387
|
156446
|
156447
|
158344
|
158345
|
158346
|
158919
|
158979