[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
Tue Jul 6 10:33:29 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28567
Jonathan Druart <jonathan.druart+koha at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #122424|0 |1
is obsolete| |
--- Comment #6 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 122603
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122603&action=edit
Bug 28567: Fix 0 vs "" vs undef on the admin library form
There are two things here:
* Branches.pickup_location has a default = 1 in DB, we should not set to undef
if 0
or it will be set to 1 when stored.
* The other fields are all text (varchar, mediumtext or longtext) and
can be NULL. They are correct set to NULL when a new library is created
but set to an empty string when the library is modified. That's not
consistent
Test plan:
0. Don't apply the patch
1. Create a new library, set pickup location to "No"
2. Save
=> Pickup location is set to YES
=> In DB notice that the different values you didn't fill in are set to
NULL
3. Edit the library
4. Save
=> In DB notice that the different values you didn't fill in are now set
to an empty string
5. Apply the patch, restart_all
6. Run the updatedatabase script
=> In DB all the empty string values are set to NULL
7. Repeat 1 to 4 and confirm that everything is now working as expected
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list