]> git.koha-community.org Git - koha.git/commit
Bug 14098: FIX Copy a subfield should not update the original field
authorJonathan Druart <jonathan.druart@koha-community.org>
Wed, 27 May 2015 10:51:37 +0000 (12:51 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 7 Sep 2015 14:17:12 +0000 (11:17 -0300)
commit8c132e956e6141b42d09e7544687fd35632ca3c6
tree297632a2d8fd9874203d7e7c95d4436a7afcf6e6
parent64992a05ce87af7bf595c8d6f0b9d528887a2e44
Bug 14098: FIX Copy a subfield should not update the original field

There is an inconsistency in the copy action:

Given the following control sample:

  245    _aThe art of computer programming
         _cDonald E. Knuth.
  300    _aA_exists
         _bB_exists

If we apply action (a) Copy the whole field 245 to 300, we get:

  245    _aThe art of computer programming
         _cDonald E. Knuth.
  300    _aA_exists
         _bB_exists
  300    _aThe art of computer programming
         _cDonald E. Knuth.

If we apply action (b) Copy the subfield 245$a to 300$a, we get:

  245    _aThe art of computer programming
         _cDonald E. Knuth.
  300    _aThe art of computer programming
         _bB_exists

In (a) the field is copied but in (b) the subfield is erased.

We should be consistent and don't erase the destination field.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/SimpleMARC.pm
t/SimpleMARC.t