[Bug 23734] New: Defaults set during patron imports throws warnings
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23734 Bug ID: 23734 Summary: Defaults set during patron imports throws warnings Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: Create a small import file, with minimal columns, tail the logs, import and note warnings IN DBIX/Class/Row: elsif ($self->_is_column_numeric($col)) { # do a numeric comparison if datatype allows it return $old == $new; But in Koha/Patrons/Import.pm We assume "" for all defaults Even if we pass defaults of '0' for these columns elsif ( $defaults->{$key} ) { won't be triggered by a 0 value, it should be 'exists' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23734 Nick Clemens <nick@bywatersolutions.com> 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=23734 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21465 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21465 [Bug 21465] Cannot overlay patrons when matching by cardnumber if userid exists in file and in Koha -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23734 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What you suggest do not remove the warning. I linked this bug report with bug 21761 as we saw that already in another (but similar) context. I tried: modified: Koha/Object.pm ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @ Object.pm:139 @ sub store { } else { # If cannot be null, get the default value # What if cannot be null and does not have a default value? Possible? + undef $self->{$col}; $self->$col($columns_info->{$col}->{default_value}); } } And get rid of of one of the 2 warnings. There is 2 warnings per attributes: on ->set_column (called from ->store, see previous diff), and a bit later, I guess in update_or_insert The attributes are the tinyint and not null: privacy_guarantor_fines, privacy_guarantor_checkouts and anonymized. We could fix that at controller level but I feel like it must be fixed at Koha::Object level. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org