Bugzilla – Attachment 6327 Details for
Bug 7134
patron records getting funny birthdays
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed Patch
0001-Bug-7134-patron-records-getting-corrupted-birthdates.patch (text/plain), 1.83 KB, created by
Ian Walls
on 2011-11-17 15:40:09 UTC
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Ian Walls
Created:
2011-11-17 15:40:09 UTC
Size:
1.83 KB
patch
obsolete
>From 80d6b7a4efedc04f0773c0f53a207f766ec7fbbc Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Thu, 17 Nov 2011 10:27:47 -0500 >Subject: [PATCH] Bug 7134: patron records getting corrupted birthdates > >If no date of birth is provided in a new member form, the borrower gets the birthdate of "00/02/0", which >is obviously incorrect (the result of passing 0 to the database directly) > >The fix is to remove a conditional check buried deep in C4::SQLHelper. This is in a helper subroutine that was changed >for the Unified Member Search dev (bug 6253). Reverting this small change to the conditional does not seem to break >search, but testing will be required. > >To test: >1. apply patch, and create a new patron with blank birthdate. The new patron should now have a blank birthdate instead of '00/02/0' >2. search for a borrower by 1 part surname, confirm search works >3. search for a borrower by 2 part surname, confirm search works >4. search for a borrower across firstname AND surname; confirm >5. search for a borrower and include categorycode/branchcode filters >--- > C4/SQLHelper.pm | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/C4/SQLHelper.pm b/C4/SQLHelper.pm >index 4c74df2..cf425fd 100644 >--- a/C4/SQLHelper.pm >+++ b/C4/SQLHelper.pm >@@ -360,7 +360,7 @@ sub _filter_hash{ > ## supposed to be a hash of simple values, hashes of arrays could be implemented > $filter_input->{$field}=format_date_in_iso($filter_input->{$field}) > if $columns->{$field}{Type}=~/date/ && >- $filter_input->{$field} && $filter_input->{$field} !~C4::Dates->regexp("iso"); >+ $filter_input->{$field} !~C4::Dates->regexp("iso"); > my ($tmpkeys, $localvalues)=_Process_Operands($filter_input->{$field},"$tablename.$field",$searchtype,$columns); > if (@$tmpkeys){ > push @values, @$localvalues; >-- >1.7.4.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 7134
:
6327
|
6330