[Bug 22571] New: Bug in Perl module "Koha::SimpleMARC::field_equals"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Bug ID: 22571 Summary: Bug in Perl module "Koha::SimpleMARC::field_equals" Change sponsored?: --- Product: Koha Version: 18.11 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: mik@adminkuhn.ch QA Contact: testopia@bugs.koha-community.org Target Milestone: --- After successfully creating a MARC modification template in Koha menu "Tools > Batch record modification" with the following action: Add new field 041$a with value ger if 008 matches RegEx m/^...................................ger..$/ the action is run over a given record and Koha says that the bibliographic record has successfully been modified - but in fact nothing has changed, thus no new MARC 041$a is created. According to Jonathan Druart (in mailinglist "Koha", 21.03.2019 17:12) this is a bug in Perl module "Koha::SimpleMARC::field_equals". -- 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=22571 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=22571 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89362&action=edit Bug 22571: Add tests -- 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=22571 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 89363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89363&action=edit Bug 22571: Handle control fields in MMT for conditionals Control fields are not handled correctly by Koha::SimpleMARC when comparaison (with or without regex) is done. Which means we did not support something like: Do something if control field 008 equals or matches "a string" Test plan: Create a new MARC modification template and a new action, like: Add new field 100$a with value "foo bar" if 008 (or any other control fields) matches (or equals) a regex Then use the record mofication tool and confirm that the new field is create if the regex matches 008 of the bib record -- 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=22571 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Version|18.11 |master Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Summary|Bug in Perl module |MARC modification templates |"Koha::SimpleMARC::field_eq |do not handle control |uals" |fields in conditional -- 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=22571 M. Tompsett <mtompset@hotmail.com> 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=22571 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89362|0 |1 is obsolete| | Attachment #89363|0 |1 is obsolete| | --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 90683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90683&action=edit Bug 22571: Add tests Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 90684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90684&action=edit Bug 22571: Handle control fields in MMT for conditionals Control fields are not handled correctly by Koha::SimpleMARC when comparaison (with or without regex) is done. Which means we did not support something like: Do something if control field 008 equals or matches "a string" Test plan: Create a new MARC modification template and a new action, like: Add new field 100$a with value "foo bar" if 008 (or any other control fields) matches (or equals) a regex Then use the record mofication tool and confirm that the new field is create if the regex matches 008 of the bib record Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 90685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90685&action=edit Bug 22571: (follow up) fix Donald cut-&-paste error Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Nick Clemens <nick@bywatersolutions.com> 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=22571 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90683|0 |1 is obsolete| | --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90896&action=edit Bug 22571: Add tests Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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=22571 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90684|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90897&action=edit Bug 22571: Handle control fields in MMT for conditionals Control fields are not handled correctly by Koha::SimpleMARC when comparaison (with or without regex) is done. Which means we did not support something like: Do something if control field 008 equals or matches "a string" Test plan: Create a new MARC modification template and a new action, like: Add new field 100$a with value "foo bar" if 008 (or any other control fields) matches (or equals) a regex Then use the record mofication tool and confirm that the new field is create if the regex matches 008 of the bib record Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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=22571 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90685|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 90898 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90898&action=edit Bug 22571: (follow up) fix Donald cut-&-paste error Signed-off-by: Mark Tompsett <mtompset@hotmail.com> 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=22571 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version(s)| |19.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 --- Comment #9 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=22571 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|19.11.00 |19.11.00,19.05.02 released in| | --- Comment #10 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 benjamin.r.philbrook@lmco.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benjamin.r.philbrook@lmco.c | |om -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Michael Kuhn <mik@adminkuhn.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED |--- --- Comment #11 from Michael Kuhn <mik@adminkuhn.ch> --- I just tested the original case in Koha 20.05.00, but wasn't successful: After creating a MARC modification template in Koha menu "Tools > Batch record modification" with the following action: Add new field 041$a with value ger if 008 matches RegEx m/^...................................ger..$/ I also tried the following action (omitting ^and $): Add new field 041$a with value ger if 008 matches RegEx m/...................................ger../ The action is run over a given record and Koha says that the bibliographic record has successfully been modified - but in fact nothing has changed, thus no new MARC 041$a is created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Michael Kuhn from comment #11)
I just tested the original case in Koha 20.05.00, but wasn't successful:
After creating a MARC modification template in Koha menu "Tools > Batch record modification" with the following action:
Add new field 041$a with value ger if 008 matches RegEx m/^...................................ger..$/
I also tried the following action (omitting ^and $):
Add new field 041$a with value ger if 008 matches RegEx m/...................................ger../
The action is run over a given record and Koha says that the bibliographic record has successfully been modified - but in fact nothing has changed, thus no new MARC 041$a is created.
Hi Michael, if a bug has already been 'released' please don't reopen but open a new bug and link to this one instead - bugzilla will email everyone on the linked bug too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25840 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25840 [Bug 25840] MARC modification templates still do not handle control fields in conditional -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22571 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org