[Bug 18710] New: Wrong subfield modified in batch item modification
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Bug ID: 18710 Summary: Wrong subfield modified in batch item modification Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Tools Assignee: gmcharlt@gmail.com Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org In Tools > Batch item modification, one can modify or delete a subfield. When deleting a subfield et modifying another, the wrong subfield gets modified. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18706, 18707 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18706 [Bug 18706] subfields to delete not disabled anymore in batch item modification https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18707 [Bug 18707] Background jobs post disabled inputs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Needs Bug 18706 and Bug 18707 to be tested. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63879&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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #3 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- This bug also appears with no background job Bug 17240. We use this for nginx + plack -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 63880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63880&action=edit Bug 18710 - batchMod-edit.tt is missing form end tag -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldjamison@marywood.edu --- Comment #5 from Lee Jamison <ldjamison@marywood.edu> --- (In reply to Fridolin SOMERS from comment #4)
Created attachment 63880 [details] [review] Bug 18710 - batchMod-edit.tt is missing form end tag
Patch application of attachment 63880 fails under both 'git --apply' and 'git bz apply' at line 274. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Lee Jamison from comment #5)
(In reply to Fridolin SOMERS from comment #4)
Created attachment 63880 [details] [review] [review] Bug 18710 - batchMod-edit.tt is missing form end tag
Patch application of attachment 63880 [details] [review] fails under both 'git --apply' and 'git bz apply' at line 274.
The patches applies cleanly on top of bug 18706 and bug 18707 for me... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- But I am not able to reproduce this issue... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #8 from Lee Jamison <ldjamison@marywood.edu> --- Yes, I apologize...it was my test box acting funny. The patches do apply. However, prior to applying the patches I also couldn't reproduce the issue either. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #9 from Baptiste <baptiste.wojtkowski@biblibre.com> --- The issue is quite hard to explain/reproduce, I'll try to do my best following: - the issue is: if you check the field which makes appear "This subfield will be deleted", all following fields will be shifted upside when you'll submit the form BUT - sometime it doesn't appear if hidden fields are located up to the targeted field, so please check in the source code that no hidden field is present. - the dataTable at the end of the batch modification suffers from another bug: is isn't refreshed with new modifications, to see them, you have to try a new modification, check in the database or on the items interface. However if your modification are all done correctly while a checkbox is checked, this is weird, this is quite weird and I invite you to post the whole precise testplan you followed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18730 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #10 from Lee Jamison <ldjamison@marywood.edu> --- Unfortunately still unable to replicate the problem without a concrete, repeatable test case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Macon <caballeromaricon@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caballeromaricon@gmail.com Status|Needs Signoff |Signed Off --- Comment #11 from Macon <caballeromaricon@gmail.com> --- Was able to test during KohaCon 17 with Lauren of SIL and Paul Poulain as the mentor. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Paul, can you share your test plan? I tried 1 - Find a patron with city, state, and zip defined 2 - Select patron for batch modification 3 - Set city = "NEWCITY" STATE-checked to delete ZIP="NEWZIP" 4 - Modification succeeds as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #13 from Lee Jamison <ldjamison@marywood.edu> --- (In reply to Nick Clemens from comment #12)
Paul, can you share your test plan?
I tried 1 - Find a patron with city, state, and zip defined 2 - Select patron for batch modification 3 - Set city = "NEWCITY" STATE-checked to delete ZIP="NEWZIP" 4 - Modification succeeds as expected
I haven't been able to reproduce the bug myself so I'd love to know Paul's test plan as well. Though I believe I'm reading it correctly that the bug occurs in batch item modification instead of batch patron modification :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Paul, can you share your test plan? I tried 1 - Find an item with copynumber,URI, replacementprice defined (subs t,u,v) 2 - Select item fro modification 3 - Set copynumber = "NEWCOP" URI-checked to delete replacementprice="32" 4 - Modification succeeds as expected -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63879|0 |1 is obsolete| | Attachment #63880|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 93145 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93145&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@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- I was able to recreate with settings in batch mod: Not for loan - checked to delete Collection code - REF (Reference) Permanent location - LPL (Liberty) Before the patch the value for permanent location ended up in ccode field Disabling the field removes the input and causes off by 1 errors - removing all the fields seems to fix this -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #93145|0 |1 is obsolete| | --- Comment #17 from Marcel de Rooy <m.de.rooy@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@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|tomascohen@gmail.com |m.de.rooy@rijksmuseum.nl CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #19 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 23715 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #20 from Christopher Brannon <cbrannon@cdalibrary.org> --- Please push this to stable and old stable. I consider this a critical bug that can do damage in mass. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #21 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 --- Comment #22 from Christopher Brannon <cbrannon@cdalibrary.org> --- (In reply to Fridolin SOMERS from comment #21)
Pushed to 19.05.x for 19.05.05
+1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |lucas@bywatersolutions.com --- Comment #23 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.11.x for 18.11.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org