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.
Created attachment 72802 [details] [review] 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
Created attachment 72810 [details] [review] 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>
works great, thanks!
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 ''?
(In reply to Alex Arnaud from comment #4) > Comment on attachment 72810 [details] [review] [review] > Bug 20385 - Don't try to get info for bad authtypecodes > > Review of attachment 72810 [details] [review] [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
Created attachment 73212 [details] [review] Bug 20385: (follow-up) Assign blank instead of inappropraite value
I think this was bad copy paste, removed the assignment
Lowering severity as it looks more like a configuration issue.
Created attachment 73479 [details] [review] 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>
Created attachment 73480 [details] [review] Bug 20385: (follow-up) Assign blank instead of inappropraite value Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>
We really need tests for these ES methods!
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.06 Awesome work all!
Not pushed to 17.05.x