Bug 31644: Check if subfield defined, not for truth
authorNick Clemens <nick@bywatersolutions.com>
Wed, 28 Sep 2022 18:53:28 +0000 (18:53 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Fri, 16 Dec 2022 14:31:51 +0000 (15:31 +0100)
commitfcd9c93caf7f2fa6740c4966c0cf56e86ff83cf4
treedfeef5ed96ba53ec896674c977baf0dad22f7306
parentdaab4314a658cb7685ce9ff319e72a5f362fb65a
Bug 31644: Check if subfield defined, not for truth

To test:
1 - Define a new MARC Modification template with actions:
        Copy field 600$a to 942$0
2 - Define a new record like:
    LDR 00334nam a22001217a 4500
    003 ff
    005 20201102111604.0
    008 201102b        xxu||||| |||| 00| 0 eng d
    040 _ _ ‡cvsd
    100 1 _ ‡012345‡aKnuth, Donal Ervin‡d1938
    245 _ _ ‡012345‡aThe aty of computer programming‡cDonald E. Knuth
    600 _ 0 ‡042‡aComputer programming‡9462
3 - Modify this record using the template above
4 - Note that entire  field is copied to 942
5 - Apply patch
6 - Now only subfield 0 is copied

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2f61afa9c502874ed98e9cc67f6b99d6365bbf95)
(cherry picked from commit 448f7d1432dc0a0d30afb288e78291b46c3db7cf)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Koha/SimpleMARC.pm