[Koha-bugs] [Bug 11221] New patrons are created with invalid dateofbirth value if field is left empty

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Nov 17 08:07:57 CET 2013


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11221

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #22879|0                           |1
        is obsolete|                            |

--- Comment #3 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 22978
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=22978&action=edit
Bug 11221: SQLHelper::_filter_hash does not manage well dates

The default values for date fields is undef, so if a date field contains
an empty string, we should insert NULL in the DB.
The format_date_in_iso routine should be only called if a date is
defined, is not equal to an empty string and does not match the iso
regex.

Partial test plan:
1. Create a new patron. Leave dateofbirth empty.
2. Save the record.
3. Open the record for editing.
4. Save the record without making changes.
5. Koha gives no error.

Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list