Koha/koha-tmpl/intranet-tmpl/prog/en
Fridolin Somers adb232c8f0
Bug 18710: Wrong subfield modified in batch item modification
In Tools > Batch item modification, one can modify or delete a subfield.
When deleting a subfield et modifying another, the wrong subfield gets modified.

This is caused by the fact that disabled inputs are not posted in form.
So for a subfield to delete :
Input name=field_value is not posted. But input name=subfield is posted with subfield code.
So these 2 arrays does not have the same size :
    my @subfields = $input->multi_param('subfield');
    my @values    = $input->multi_param('field_value');

For exemple, deleting $2, not changing $u and modidying $v will modify $u with value for $v o_O

This patch correts but setting disabled all inputs of a deleted subfield : field_value, tag, subfield and mandatory. Like it was not present in the form.

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Lets say there are subfields : $2 (not mandatory), $u and $v
- Check the subfield $2 to be deleted
=> $2 input is disabled
- Enter a text in $v
- Submit the form
=> Without patch, the text for $v gets into $u
=> With patch, the text for $v gets into $v
- Check the subfield $2 is well deleted

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-09-27 14:00:35 +01:00
..
data Bug 19648: Revise marc21_field_007.xml 2019-04-12 01:47:51 +00:00
includes Bug 23321: (RM follow-up) Accounts vs. Accounting 2019-09-27 10:37:19 +01:00
modules Bug 18710: Wrong subfield modified in batch item modification 2019-09-27 14:00:35 +01:00
xslt Bug 21058: Added HTML class to showRDAtag264 2019-09-12 16:46:39 +01:00
columns.def Bug 14570: Make it possible to add multiple guarantors to a record 2019-08-20 16:04:48 +01:00