[Koha-bugs] [Bug 28567] Pick-up location is not saved correctly when creating a new library

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 28 13:14:56 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28567

--- Comment #20 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Jonathan Druart from comment #19)
> 
> Which "confusing construction" are you talking about? The map introduced by
> this patch? It's just simple and easy Perl code.

Comment16
This kind of thing in the template is confusing: [% IF !library ||
library.pickup_location == 1 %]
Actually, the longer I look at it, the better I could live with it ;)


> In Koha::Object->new we are making the DBMS use the default value (so
> defined in the DB schema) by *removing* the key of the attributes that is
> "NOT NULL" *but* not defined!

Yes, but we do not really use the default value. Thats my point. I would
suggest to return 1 for pickup_location here.
See comment16: 
Why not set $attributes->{$column_name} = $c_info->{default_value} if defined
and delete only if not?


> Based on that, what I understand from your suggestion would be to remove
> 'pickup_location' from the constructor if it's equal to '1'. But that would
> be very bad (what if the default value is modified later?), so I guess you
> had something else in mind :)

No thats not my idea.

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


More information about the Koha-bugs mailing list