[Bug 21819] New: Marc modification templates action always checks Regexp checkbox
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Bug ID: 21819 Summary: Marc modification templates action always checks Regexp checkbox Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Templates Assignee: oleonard@myacpl.org Reporter: pasi.kallinen@joensuu.fi QA Contact: testopia@bugs.koha-community.org When you add an action to a Marc modification template, there's a RegEx checkbox for replacing data in the field. This checkbox is automatically checked if you edit the action, even when you did not check it when saving the action. To reproduce: 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org Component|Templates |Tools -- 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=21819 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |arouss1980@gmail.com |ity.org | CC| |arouss1980@gmail.com -- 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=21819 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 --- Comment #1 from Andreas Roussos <arouss1980@gmail.com> --- Created attachment 82424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82424&action=edit Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 paxed <pasi.kallinen@joensuu.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82424|0 |1 is obsolete| | --- Comment #2 from paxed <pasi.kallinen@joensuu.fi> --- Created attachment 82427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82427&action=edit Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21867 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21867 [Bug 21867] Replace remaining document.element.onchange calls in marc_modification_templates.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82427|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82551&action=edit Bug 21819: Marc modification templates action always checks Regexp checkbox When editing a MARC modification template action, the 'RegEx' checkbox to the right of the 'to field' textboxes will always appear checked, even if no regular expression has been added. This patch fixes that. Test plan (steps 1-5 are copied from the original report -- thanks Pasi!): 1) Go to Tools > Marc modification templates, and create a new template 2) Add a new action to the template 3) Edit the action so it's "Move" field to another field. Do not check the RegEx checkbox after the "To" field. 4) Save the action. 5) Edit the same action again. The checkbox is now checked. 6) Apply the patch and hit Ctrl-F5 to do a hard refresh in your browser. 7) Edit the action you saved in 4): this time the 'RegEx' checkbox should be unchecked. 8) For completeness, add a regular expression to the "Move" action created in 3) and click on 'Update action'. When you re-edit this action the 'RegEx' checkbox should be checked. Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi> 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=21819 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 82552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82552&action=edit Bug 21819: (QA follow-up) Replace onchange() in touched code AFAIK we should not call document...onchange() and assume that it works. Apparently, it does at least in some browsers. But we are not sure. We could easily replace them here by the documented jQuery counterpart. Note: If you try git grep -l -E "onchange\(" you will find some occurrences in two libraries and only in one js file (this one). We should replace all occurrences here; will open a new report for that. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that the change event was triggered: span should expand/collapse. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Andreas Roussos <arouss1980@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #82552|0 |1 is obsolete| | --- Comment #5 from Andreas Roussos <arouss1980@gmail.com> --- Created attachment 82555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82555&action=edit Bug 21819: (QA follow-up) Replace onchange() in touched code AFAIK we should not call document...onchange() and assume that it works. Apparently, it does at least in some browsers. But we are not sure. We could easily replace them here by the documented jQuery counterpart. Note: If you try git grep -l -E "onchange\(" you will find some occurrences in two libraries and only in one js file (this one). We should replace all occurrences here; will open a new report for that. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Verified that the change event was triggered: span should expand/collapse. Signed-off-by: Andreas Roussos <arouss1980@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com Status|Pushed to Master |Pushed to Stable --- Comment #7 from Jesse Maseto <jesse@bywatersolutions.com> --- Backported to 18.05 for 18.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.13 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21819 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org