]> git.koha-community.org Git - koha.git/commit
Bug 11413: Fix field_numbers
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 19 Jun 2014 16:15:36 +0000 (18:15 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 14 Nov 2014 15:05:47 +0000 (12:05 -0300)
commitb969aa3fa3d256e7a2adaf9a78df0ad8e99208e4
tree621beed77999736a91c2b8e4606b56e1f8351bc3
parentf76b5c8141c224fbacc648a88ee171251055b112
Bug 11413: Fix field_numbers

This fix is a global fix for the MarcModificationTemplate feature.
Some unit tests were missing and some behaviors were wrong.
For instance, if you tried to update a non existent field, the script
crashed.

The following line was completely stupid:
    if $from_field ne $to_subfield

The field_number equals 1 if the user wants to update the first field
and 0 for all fields.

The field_numbers (note the s) variable contains the field numbers to
update. This array is filled if a condition exists (field exists or
field equals).

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/MarcModificationTemplates.pm
Koha/SimpleMARC.pm
t/db_dependent/MarcModificationTemplates.t