Bugzilla – Attachment 38706 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]
[PASSED QA] Bug 11925: Check ages limits when creating/updating patrons
PASSED-QA-Bug-11925-Check-ages-limits-when-creatin.patch (text/plain), 1.87 KB, created by
Katrin Fischer
on 2015-04-29 22:07:53 UTC
(
hide
)
Description:
[PASSED QA] Bug 11925: Check ages limits when creating/updating patrons
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-04-29 22:07:53 UTC
Size:
1.87 KB
patch
obsolete
>From c655aabe492f4d3006e904d7c8097bf088116f3b 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] [PASSED QA] 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> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > members/memberentry.pl | 4 +--- > 1 file changed, 1 insertion(+), 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.9.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 11925
:
38599
|
38690
| 38706