Bugzilla – Attachment 137841 Details for
Bug 7660
Enhanced messaging preferences are not set when creating a child patron from the adult
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7660: Use first available categorycode when none passed in
Bug-7660-Use-first-available-categorycode-when-non.patch (text/plain), 2.18 KB, created by
Katrin Fischer
on 2022-07-18 19:22:01 UTC
(
hide
)
Description:
Bug 7660: Use first available categorycode when none passed in
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2022-07-18 19:22:01 UTC
Size:
2.18 KB
patch
obsolete
>From 7418e3464eeddd0d81af148a33762db91b0a3ca8 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 18 Jul 2022 11:49:57 +0000 >Subject: [PATCH] Bug 7660: Use first available categorycode when none passed > in > >The code that populates the patron messaging preferences on initial form load >expects to have a category selected. Currently we only have one if one was >passed to the form. When creating an account from a parent, we don't have a >category explicitly selected - so we can just select the first of the possible >categories > >To test: > 1 - In KTD set 'Juvenile' category to have some messaging preferences > 2 - Find a patron, say Edna Acosta, and 'Add guarantee' > 3 - In new form preferences are blank, cancel > 4 - Apply patch, restart all > 5 - Go to Edna, click 'Add guarantee' > 6 - Preferences are populated! > 7 - Cancel > 8 - Go to 'Patrons' module > 9 - Click "+ New patron" >10 - Confirm messaging preferences load correctly when not adding child > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > members/memberentry.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 6a42ebd938..23575272aa 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -680,13 +680,14 @@ foreach my $category_type (qw(C A S P I X)) { > > my @categoryloop; > while ( my $patron_category = $patron_categories->next ) { >+ $categorycode = $patron_category->categorycode unless defined($categorycode); #If none passed in, select the first > push @categoryloop, > { 'categorycode' => $patron_category->categorycode, > 'categoryname' => $patron_category->description, > 'effective_min_password_length' => $patron_category->effective_min_password_length, > 'effective_require_strong_password' => $patron_category->effective_require_strong_password, > 'categorycodeselected' => >- ( defined($categorycode) && $patron_category->categorycode eq $categorycode ), >+ ( $patron_category->categorycode eq $categorycode ), > }; > } > my %typehash; >-- >2.30.2
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 7660
:
137801
|
137821
| 137841