[Bug 33342] New: Assignment when should be comparison results in framework being overwritten with invalid value
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 Bug ID: 33342 Summary: Assignment when should be comparison results in framework being overwritten with invalid value Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl In the last patch in bug 15869 a bug is introduced when assignment (=) is mistakenly used instead of "eq", resulting in an invalid marc framework value being stored for replaced records, which in turn makes them non editable in the staff interface. Considering this has been backported to to 22.11.03 and could affect current users would be good to get this fixed rather quickly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Created attachment 148766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148766&action=edit Bug 33342: Assigment in if clause sets invalid marc framework In a follow up in bug 15869 an if clause is added where "=" is used instead of "eq" in effect setting an invalid marc famework for the record. Fix this by using the correct operator. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Assignment when should be |Assigment in if clause sets |comparison results in |invalid marc framework |framework being overwritten | |with invalid value | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 Andreas Jonsson <andreas.jonsson@kreablo.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andreas.jonsson@kreablo.se --- Comment #2 from Andreas Jonsson <andreas.jonsson@kreablo.se> --- Obviously, the intention must be comparison; not assignment. But I don't see how this can introduce an invalid framework code. When I test the parameter "overlay_framework" is simply ignored. The expression $overlay_framework = '_USE_ORIG' should evaluate to TRUE, so the body of the if-statement, $overlay_framework = undef, should always be executed. Also, in manage-marc-import.tt the option name seems to have an underscore at the end as well: <option value="_USE_ORIG_">Keep original framework</option> So, only replacing assignment with comparison operator actually introduces the incorrect framework codes. We also need to fix the code value. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 Stefan Berndtsson <stefan.berndtsson@ub.gu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |stefan.berndtsson@ub.gu.se --- Comment #3 from Stefan Berndtsson <stefan.berndtsson@ub.gu.se> --- Yes, of course. Thanks for that. That explains things (from the other perspective). I think our experience (having received "_USE"-frameworkcodes in the database) comes from us fixing the comparison, but not the dropdown, so now when the comparison works properly, it gets the wrong value, as you say. This patch should be updated before going forward. Setting it to "In Discussion" until it is properly fixed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Assigment in if clause sets |Fix framework handling in |invalid marc framework |manage-marc-import.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #148766|0 |1 is obsolete| | --- Comment #4 from David Gustafsson <glasklas@gmail.com> --- Created attachment 148822 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148822&action=edit Bug 33342: Fix framework handling in manage-marc-import.pl In a follow up in bug 15869 an if clause is added where "=" is used instead of "eq" resulting in framwork always being set to undef. Fix this by using the correct operator. Also fix the name of the framework placeholder in manage-marc-import.pl which differed from the template. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #5 from David Gustafsson <glasklas@gmail.com> --- @Andreas Jonsson, thanks for spotting this! Have now fixed the patch and changed the description as the previous one did not correctly describe the current behavior. Since the assignment evaluates to true in a boolean context $overlay_framework as far as I can tell is always set to undef (which should now be fixed). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- If you could add a test plan, I would be more than happy to test. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mengu@devinim.com.tr --- Comment #7 from Phil Ringnalda <phil@chetcolibrary.org> --- *** Bug 33692 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=33342 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com, | |phil@chetcolibrary.org Depends on| |15869 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15869 [Bug 15869] Change framework on overlay -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33342 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Depends on|15869 | Status|Needs Signoff |RESOLVED --- Comment #8 from Phil Ringnalda <phil@chetcolibrary.org> --- *** This bug has been marked as a duplicate of bug 33412 *** Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15869 [Bug 15869] Change framework on overlay -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org