Bug 26781: Check for subfield defined rather than truth
authorNick Clemens <nick@bywatersolutions.com>
Thu, 22 Oct 2020 10:59:17 +0000 (10:59 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sun, 25 Oct 2020 23:14:41 +0000 (00:14 +0100)
commitbe4f0c7639a679b1ec808e6e9cf9af0fc9576e79
tree366300fd59a36eb32af0ced4fe4c6c63ffb55e20
parenta96de8283ba41ebff0d8e1a7c491fc5bcff5dc18
Bug 26781: Check for subfield defined rather than truth

To recreate:
 1 - Have a record with 100$0 defined
 2 - Define a Marc Modification template:
    Delete field 100$0
 3 - Perform Batch record modification, enter the record above in the list of records
 4 - Preview the MARC
 5 - Note the entire 100 field has been deleted, don't modify the record
 6 - Apply patch
 7 - Restart all the things
 8 - Test the modification again
 9 - This time the preview confirms only the subfield 0 deleted
10 - Modify the record
11 - Confirm the record is correctly updated

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
JD amended patch: Fix typo ony vs only

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SimpleMARC.pm
t/SimpleMARC.t