[Bug 33205] New: (Bug 28268 follow-up) Method call inside quotes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 Bug ID: 33205 Summary: (Bug 28268 follow-up) Method call inside quotes Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com CC: ere.maijala@helsinki.fi Bug 28268, in Koha::MetadataRecord::Authority::get_all_authorities_iterator, introduced a warning: warn "Something went wrong reading record for authority $row->authid: $@\n"; But a method cannot be called from within quotes in Perl - extrapolation does not work for functions/methods. So, if something really goes wrong, this line of code produces a warning like: Something went wrong reading record for authority Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty String at /usr/share/perl5/MARC/File/XML.pm line 450. which is not very informative -- authid is missing. Proposal: $row->authid should be placed outside of the quotes. -- 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=33205 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|(Bug 28268 follow-up) |(Bug 28268 follow-up) |Method call inside quotes |Method call $row->authid | |inside quotes - produces | |meaningless warning -- 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=33205 Janusz Kaczmarek <januszop@gmail.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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 164718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164718&action=edit Bug 33205 (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning Bug 28268, in Koha::MetadataRecord::Authority::get_all_authorities_iterator, introduced a warning: warn "Something went wrong reading record for authority $row->authid: $@\n"; But a method cannot be called from within quotes in Perl - extrapolation does not work for functions/methods. So, if something really goes wrong, this line of code produces a warning like: Something went wrong reading record for authority Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty String at /usr/share/perl5/MARC/File/XML.pm line 450. which is not very informative -- authid is missing. Test plan ========= Hard to reproduce. This problem occurs only in rare cases of some weird problem in stores authority data or if a auth record had been deleted after a ES reindex action has been initiated. But the problem in the code and the fix seem obvious. -- 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=33205 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28268 Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28268 [Bug 28268] Improve memory usage when indexing authorities in Elasticsearch -- 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=33205 Nick Clemens <nick@bywatersolutions.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=33205 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 164826 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164826&action=edit Bug 33205: (bug 28268 follow-up) Method call $row->authid inside quotes - produces meaningless warning Bug 28268, in Koha::MetadataRecord::Authority::get_all_authorities_iterator, introduced a warning: warn "Something went wrong reading record for authority $row->authid: $@\n"; But a method cannot be called from within quotes in Perl - extrapolation does not work for functions/methods. So, if something really goes wrong, this line of code produces a warning like: Something went wrong reading record for authority Koha::Schema::Result::AuthHeader=HASH(0x55cf7e0d0958)->authid: Empty String at /usr/share/perl5/MARC/File/XML.pm line 450. which is not very informative -- authid is missing. Test plan ========= Hard to reproduce. This problem occurs only in rare cases of some weird problem in stores authority data or if a auth record had been deleted after a ES reindex action has been initiated. But the problem in the code and the fix seem obvious. 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=33205 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Attachment #164718|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 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=33205 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.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=33205 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.06 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33205 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED --- Comment #6 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org