[Bug 20385] New: ElasticSearch authority search raises Software error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Bug ID: 20385 Summary: ElasticSearch authority search raises Software error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: nicolas.legrand@bulac.fr With UNIMARC authorities and ES 5.8, from authority home. Default contains שלו (search entire record) None Submit -> http://localhost:9999/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode=&marclist=all&and_or=and&excluding=&operator=contains&value=%D7%A9%D7%9C%D7%95&orderby= Software error: Can't call method "auth_tag_to_report" on an undefined value at /home/koha/kohaclone/Koha/SearchEngine/Elasticsearch/Search.pm line 221. -- 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=20385 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nicolas.legrand@bulac.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17373 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17373 [Bug 17373] Elasticsearch - Authority mappings for UNIMARC -- 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=20385 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 72802 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72802&action=edit Bug 20385 - Don't try to get info for bad authtypecodes TO test: 0 - Have a koha with ES enabled and some auth records 1 - backup your db 2 - sudo koha-mysql <<instance>> 3 - UPDATE auth_types SET authtypecode="PERSO_NAMB" WHERE authtypecode="PERSO_NAME" (or adjust as necessary) 4 - Search for some authorities where a PERSO_NAME record will be returned 5 - KA_BOOM! 6 - Apply patch 7 - Results are returned, they do not display a code, viewing record you won't see code -- 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=20385 Nicolas Legrand <nicolas.legrand@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72802|0 |1 is obsolete| | --- Comment #2 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- Created attachment 72810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72810&action=edit Bug 20385 - Don't try to get info for bad authtypecodes TO test: 0 - Have a koha with ES enabled and some auth records 1 - backup your db 2 - sudo koha-mysql <<instance>> 3 - UPDATE auth_types SET authtypecode="PERSO_NAMB" WHERE authtypecode="PERSO_NAME" (or adjust as necessary) 4 - Search for some authorities where a PERSO_NAME record will be returned 5 - KA_BOOM! 6 - Apply patch 7 - Results are returned, they do not display a code, viewing record you won't see code Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> -- 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=20385 --- Comment #3 from Nicolas Legrand <nicolas.legrand@bulac.fr> --- works great, thanks! -- 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=20385 Alex Arnaud <alex.arnaud@biblibre.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=20385 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=20385 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |alex.arnaud@biblibre.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=20385 --- Comment #4 from Alex Arnaud <alex.arnaud@biblibre.com> --- Comment on attachment 72810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72810 Bug 20385 - Don't try to get info for bad authtypecodes Review of attachment 72810: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20385&attachment=72810) ----------------------------------------------------------------- ::: Koha/SearchEngine/Elasticsearch/Search.pm @@ +217,4 @@
# with the record. It's not documented why this is the case, so # it's not reproduced here yet. my $authtype = $rs->single; + my $auth_tag_to_report = $authtype ? $authtype->auth_tag_to_report : $authtypecode;
Works fine but i feel not confortable with the fact of putting an auth type code inside a variable supposed to contain a marc field tag. Why not just ''? -- 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=20385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |m.de.rooy@rijksmuseum.nl -- 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=20385 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Alex Arnaud from comment #4)
Comment on attachment 72810 [details] [review] Bug 20385 - Don't try to get info for bad authtypecodes
Review of attachment 72810 [details] [review]: -----------------------------------------------------------------
::: Koha/SearchEngine/Elasticsearch/Search.pm @@ +217,4 @@
# with the record. It's not documented why this is the case, so # it's not reproduced here yet. my $authtype = $rs->single; + my $auth_tag_to_report = $authtype ? $authtype->auth_tag_to_report : $authtypecode;
Works fine but i feel not confortable with the fact of putting an auth type code inside a variable supposed to contain a marc field tag. Why not just ''?
Agreed. Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 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=20385 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 73212 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73212&action=edit Bug 20385: (follow-up) Assign blank instead of inappropraite value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- I think this was bad copy paste, removed the assignment -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Severity|blocker |major --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lowering severity as it looks more like a configuration issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #72810|0 |1 is obsolete| | --- Comment #9 from Alex Arnaud <alex.arnaud@biblibre.com> --- Created attachment 73479 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73479&action=edit Bug 20385 - Don't try to get info for bad authtypecodes TO test: 0 - Have a koha with ES enabled and some auth records 1 - backup your db 2 - sudo koha-mysql <<instance>> 3 - UPDATE auth_types SET authtypecode="PERSO_NAMB" WHERE authtypecode="PERSO_NAME" (or adjust as necessary) 4 - Search for some authorities where a PERSO_NAME record will be returned 5 - KA_BOOM! 6 - Apply patch 7 - Results are returned, they do not display a code, viewing record you won't see code Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr> Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #73212|0 |1 is obsolete| | --- Comment #10 from Alex Arnaud <alex.arnaud@biblibre.com> --- Created attachment 73480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73480&action=edit Bug 20385: (follow-up) Assign blank instead of inappropraite value Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Alex Arnaud <alex.arnaud@biblibre.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=20385 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20509 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20509 [Bug 20509] Data consistency - authority types -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- We really need tests for these ES methods! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to stable for 17.11.06 Awesome work all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20385 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #14 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org