[Koha-bugs] [Bug 18710] Wrong subfield modified in batch item modification
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Sep 27 08:07:26 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #93145|0 |1
is obsolete| |
--- Comment #17 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 93179
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93179&action=edit
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 at bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list