This bug report follows bug 7817, refer to it for more details.
Created attachment 31376 [details] [review] Bug 12874: A DB field without a default mapping is set to a default value on editing If an item is edited and a field is not mapped to Koha, it is to 0 or NULL (depending on the default value defined). This patch adds a check on the mapping before editing the item. It there is no mapping, the DB value is not erased. Test plan: 1/ Edit an item and fill a value for a field 2/ Unmap this field 3/ Edit the item 4/ Verify that the value is not erased (using the MySQL CLI)
CONFLICT (content): Merge conflict in C4/Items.pm Failed to merge in the changes. Patch failed at 0001 Bug 12874: A DB field without a default mapping is set to a default value on editing
Created attachment 31517 [details] [review] Bug 12874: A DB field without a default mapping is set to a default value on editing If an item is edited and a field is not mapped to Koha, it is to 0 or NULL (depending on the default value defined). This patch adds a check on the mapping before editing the item. It there is no mapping, the DB value is not erased. Test plan: 1/ Edit an item and fill a value for a field 2/ Unmap this field 3/ Edit the item 4/ Verify that the value is not erased (using the MySQL CLI)
Created attachment 31523 [details] [review] [SIGNED OFF] Bug 12874: A DB field without a default mapping is set to a default value on editing If an item is edited and a field is not mapped to Koha, it is to 0 or NULL (depending on the default value defined). This patch adds a check on the mapping before editing the item. It there is no mapping, the DB value is not erased. Test plan: 1/ Edit an item and fill a value for a field 2/ Unmap this field 3/ Edit the item 4/ Verify that the value is not erased (using the MySQL CLI) Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Created attachment 31555 [details] [review] [PASSED QA] Bug 12874: A DB field without a default mapping is set to a default value on editing If an item is edited and a field is not mapped to Koha, it is to 0 or NULL (depending on the default value defined). This patch adds a check on the mapping before editing the item. It there is no mapping, the DB value is not erased. Test plan: 1/ Edit an item and fill a value for a field 2/ Unmap this field 3/ Edit the item 4/ Verify that the value is not erased (using the MySQL CLI) Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Jonathan!