[Bug 28290] New: Record matching rules with no subfields cause ISE
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Bug ID: 28290 Summary: Record matching rules with no subfields cause ISE Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error -- 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=28290 Nick Clemens <nick@bywatersolutions.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=28290 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120474 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120474&action=edit Bug 28290: Don't send subfields to 'as_string' if none to send This fixes an error where we send a blank string to Marc::Field->as_string The subroutine fails as the regex is marked as incomplete as there is nothing between the brackets Also fixes a missing hidden input for 'item_action' when no items are staged during import 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! 10 - Stage the record again using the rule for matching 11 - It stages and matches! -- 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=28290 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120475&action=edit Test record -- 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=28290 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=28290 Owen Leonard <oleonard@myacpl.org> 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=28290 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120474|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 120686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120686&action=edit Bug 28290: Don't send subfields to 'as_string' if none to send This fixes an error where we send a blank string to Marc::Field->as_string The subroutine fails as the regex is marked as incomplete as there is nothing between the brackets Also fixes a missing hidden input for 'item_action' when no items are staged during import 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! 10 - Stage the record again using the rule for matching 11 - It stages and matches! Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- QA script explodes a bit - missing a dependency maybe? Can you please verify/check? FAIL C4/Matcher.pm OK critic OK forbidden patterns OK git manipulation OK pod FAIL pod coverage POD coverage was greater before, try perl -MPod::Coverage=PackageName -e666 OK spelling FAIL valid Can't locate Carp/Always.pm in @INC (you may need to install the Carp::Always module) (@INC contains: /home/vagrant/kohaclone /home/vagrant/qa-test-tools /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 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=28290 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120686|0 |1 is obsolete| | --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120827 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120827&action=edit Bug 28290: Don't send subfields to 'as_string' if none to send This fixes an error where we send a blank string to Marc::Field->as_string The subroutine fails as the regex is marked as incomplete as there is nothing between the brackets Also fixes a missing hidden input for 'item_action' when no items are staged during import 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! 10 - Stage the record again using the rule for matching 11 - It stages and matches! Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 120828 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120828&action=edit Bug 28290: (follow-up) Remove debug code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks good.. but, it looks like C4::Matcher is fairly well tested.. could you add a test for this change too? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Martin Renvoize <martin.renvoize@ptfs-europe.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=28290 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> --- Still valid ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 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=28290 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #120827|0 |1 is obsolete| | Attachment #120828|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140066&action=edit Bug 28290: Don't send subfields to 'as_string' if none to send This fixes an error where we send a blank string to Marc::Field->as_string The subroutine fails as the regex is marked as incomplete as there is nothing between the brackets Also fixes a missing hidden input for 'item_action' when no items are staged during import 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! 10 - Stage the record again using the rule for matching 11 - It stages and matches! Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 140067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140067&action=edit Bug 28290: (follow-up) Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=28290 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140066|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 140263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140263&action=edit Bug 28290: Don't send subfields to 'as_string' if none to send This fixes an error where we send a blank string to Marc::Field->as_string The subroutine fails as the regex is marked as incomplete as there is nothing between the brackets Also fixes a missing hidden input for 'item_action' when no items are staged during import 1 - Define a new matching rule with no subfields Match-threshold: 1000 Record type: bibliographic record Search-index: Other-control-number Score: 1000 Tag: 035 Subfields: Offset: Length: 2 - Attempt to stage a record with an 035 using this rule (i will attach example to bug) 3 - Staging fails 4 - Stage again with no matching rule 5 - Manage the staged record, try to apply the matching rule 6 - It fails, 500 error 7 - Apply patch 8 - Restart all the things 9 - Apply rule again, it works! 10 - Stage the record again using the rule for matching 11 - It stages and matches! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140067|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 140264 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140264&action=edit Bug 28290: (follow-up) Unit test Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.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=28290 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | Status|Pushed to master |Pushed to stable --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.07 release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 Status|Pushed to stable |Pushed to oldstable --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11.x for 21.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28290 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #16 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org