[Bug 18016] New: C4::Auth_with_ldap:: ldap_entry_2_hash inserts 0000-00-00 for invalid dateofbirth
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Bug ID: 18016 Summary: C4::Auth_with_ldap::ldap_entry_2_hash inserts 0000-00-00 for invalid dateofbirth Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: gmcharlt@gmail.com Reporter: dpavlin@rot13.org QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17933 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I guess diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index a58f4e6..8a69d97 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -350,6 +350,9 @@ sub update_local { my $borrowerid = shift or croak "No borrowerid"; my $borrower = shift or croak "No borrower record"; + for my $field ( qw( dateofbirth dateenrolled dateexpiry debarred sms_provider_id guarantorid ) ) { + delete $borrower->{$field} unless $borrower->{$field}; + } my @keys = keys %$borrower; my $dbh = C4::Context->dbh; Should fix this issue, but I am not able to test. I am also wondering if it would not be better to call ModMember. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 --- Comment #2 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Seems good, but would it better to do dt_from_string on them to verify they are also valid? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Dobrica Pavlinusic from comment #2)
Seems good, but would it better to do dt_from_string on them to verify they are also valid?
It should not happen I think. If that happened, I guess some people would have raised this problem before. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31143 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31143 [Bug 31143] We should attempt to fix/identify all cases where '0000-00-00' may still remain in the database -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18016 betka@illinois.edu changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=36822 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org