Bugzilla – Attachment 91041 Details for
Bug 23224
Inconsistent behaviour between memberentry.pl and the update-child.pl when updating child patron to Adult
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23224: Fix inconsistent behaviour of memberentry.pl
Bug-23224-Fix-inconsistent-behaviour-of-memberentr.patch (text/plain), 2.73 KB, created by
Alex Buckley
on 2019-06-27 01:13:17 UTC
(
hide
)
Description:
Bug 23224: Fix inconsistent behaviour of memberentry.pl
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2019-06-27 01:13:17 UTC
Size:
2.73 KB
patch
obsolete
>From fab19968a08b0302fb18b89cd0ee899cc382c0ae Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 26 Jun 2019 23:32:35 +0000 >Subject: [PATCH] Bug 23224: Fix inconsistent behaviour of memberentry.pl > >When editing a child patron (in memberentry.pl) and changing their >patron category to a non-child patron category Koha does not set the >guarantorid to 0. > >This means we end up with non-child patrons with guarantors, which is >currently not allowed by Koha. > >Whereas the behaviour in child-update.pl (which can be accessed from a >patrons summary page by clicking 'More'->Update child to adult >patron') sets the borrowers guarantorid value to 0. This is the correct >behaiviour and is what memberentry.pl should be doing. This patch fixes >that. > >Test plan: >See how memberentry.pl currently behaves >1. Create a adult patron and select 'Add child' and create the child >record. > >2. Enter the Koha MySQL terminal and select the guarantorid value for >the child record you just created: > >SELECT guarantorid FROM borrowers WHERE userid=<username>; > >3. Notice the guarantorid is set to the adult patrons borrowernumber > >4. On the child record select 'Edit' and in the memberentry.pl page >change the category to any non-child patron category (for example >'Patron') and save > >5. Repeat step 2 and notice the guarantorid value has not changed > >---- > >See how child-update.pl currently behaves > >6. Repeat steps 1-3 and on the child record select More > Update child >to adult patron > >7. In the child-update.pl window that loads select any patron category and save > >8. Repeat step 2 and notice the guarantorid is now 0 > >---- > >See how the patch fixes the behaviour of memberentry.pl > >9. Apply patch > >10. Repeat steps 1-5 and notice the guarantorid is now empty > >Sponsored-By: Brimbank Library, Australia >--- > members/memberentry.pl | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index bd86e36..05ca3fd 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -531,6 +531,11 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ > $newdata{debarredcomment} = $newdata{debarred_comment}; > delete $newdata{debarred_comment}; > delete $newdata{password2}; >+ >+ if (( $newdata{categorycode} ne 'J' ) || ( $newdata{categorycode} ne 'K' ) || ( $newdata{categorycode} ne 'YA' )) { >+ $newdata{guarantorid} = ''; >+ } >+ > $patron->set(\%newdata)->store if scalar(keys %newdata) > 1; # bug 4508 - avoid crash if we're not > # updating any columns in the borrowers table, > # which can happen if we're only editing the >-- >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 23224
:
91038
|
91041
|
91042
|
91043
|
91109
|
91110
|
91115