Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl. But the error message does not show the biblionumber of invalid biblio record.
Created attachment 107941 [details] [review] Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl. But the error message does not show the biblionumber of invalid biblio record. Test plan: 1) Import a bibliographic record with invalid XML, you can add non printable characters, like 0x1F (CTRL-V 1F with vim) 2) Run misc/maintenance/search_for_data_inconsistencies.pl 3) Check you see correct biblionumber in error message : Invalid data, cannot decode object (id=xxx, biblionumber=yyy, format=marcxml, schema=zzz, decoding_error=...
You certainly need to adjust t/Koha/Exceptions.t
Created attachment 107944 [details] [review] Bug 26171: adapt Koha/Exceptions.t
(In reply to Jonathan Druart from comment #2) > You certainly need to adjust t/Koha/Exceptions.t Of course, thanks [U+1F92D]
Created attachment 114050 [details] [review] Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl. But the error message does not show the biblionumber of invalid biblio record. Test plan: 1) Import a bibliographic record with invalid XML, you can add non printable characters, like 0x1F (CTRL-V 1F with vim) 2) Run misc/maintenance/search_for_data_inconsistencies.pl 3) Check you see correct biblionumber in error message : Invalid data, cannot decode object (id=xxx, biblionumber=yyy, format=marcxml, schema=zzz, decoding_error=... Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Created attachment 114051 [details] [review] Bug 26171: adapt Koha/Exceptions.t Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
It works! also, QA script ok
Created attachment 114575 [details] [review] Bug 26171: Show biblionumber in Koha::Exceptions::Metadata::Invalid Bug 23846 added a check for invalid MARCXML in search_for_data_inconsistencies.pl. But the error message does not show the biblionumber of invalid biblio record. Test plan: 1) Import a bibliographic record with invalid XML, you can add non printable characters, like 0x1F (CTRL-V 1F with vim) 2) Run misc/maintenance/search_for_data_inconsistencies.pl 3) Check you see correct biblionumber in error message : Invalid data, cannot decode object (id=xxx, biblionumber=yyy, format=marcxml, schema=zzz, decoding_error=... Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 114576 [details] [review] Bug 26171: adapt Koha/Exceptions.t Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 114577 [details] [review] Bug 26171: (QA follow-up) Add table name and object type to message Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Added a follow-up to clarify which object threw the exception and explain where the id comes from - feel free to drop if you disagree RM
(In reply to Nick Clemens from comment #11) > Added a follow-up to clarify which object threw the exception and explain > where the id comes from - feel free to drop if you disagree RM +1
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.02
Pushed to 20.05.x for 20.05.08
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.