Bugzilla – Attachment 38690 Details for
Bug 11925
patron category not checking ages limits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF]Bug 11925: Check ages limits when creating/updating patrons
SIGNED-OFFBug-11925-Check-ages-limits-when-creatin.patch (text/plain), 1.82 KB, created by
Christopher Brannon
on 2015-04-29 20:27:48 UTC
(
hide
)
Description:
[SIGNED OFF]Bug 11925: Check ages limits when creating/updating patrons
Filename:
MIME Type:
Creator:
Christopher Brannon
Created:
2015-04-29 20:27:48 UTC
Size:
1.82 KB
patch
obsolete
>From 6d51071303459a4f1ae61a8a67af732400f5b54b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 28 Apr 2015 11:45:46 +0200 >Subject: [PATCH] [SIGNED OFF]Bug 11925: Check ages limits when creating/updating patrons > >The check on the ages limits is only done when the dateofbirth field is >mandatory, which does not make any sense. >This check should be done when the field is filled. > >Test plan: >1/ Remove the dateofbirth field from the BorrowerMandatoryField pref >2/ Create a patron category for teenager (say between 12-17y) >3/ Try to create a patron in this category outside the range of the ages >limits. >You should not be able to do it. > >Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org> >--- > members/memberentry.pl | 4 +--- > 1 files changed, 1 insertions(+), 3 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 22bceab..967ebd1 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -135,8 +135,6 @@ my @field_check=split(/\|/,$check_BorrowerMandatoryField); > foreach (@field_check) { > $template->param( "mandatory$_" => 1); > } >-# we'll need this, later. >-my $dateofbirthmandatory = (scalar grep {$_ eq "dateofbirth"} @field_check) ? 1 : 0; > # function to designate unwanted fields > my $check_BorrowerUnwantedField=C4::Context->preference("BorrowerUnwantedField"); > @field_check=split(/\|/,$check_BorrowerUnwantedField); >@@ -305,7 +303,7 @@ if ($op eq 'save' || $op eq 'insert'){ > : () > } > >- if ($newdata{dateofbirth} && $dateofbirthmandatory) { >+ if ( $newdata{dateofbirth} ) { > my $age = GetAge($newdata{dateofbirth}); > my $borrowercategory=GetBorrowercategory($newdata{'categorycode'}); > my ($low,$high) = ($borrowercategory->{'dateofbirthrequired'}, $borrowercategory->{'upperagelimit'}); >-- >1.7.2.5
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 11925
:
38599
|
38690
|
38706