[Bug 31239] New: search_for_data_inconsistencies.pl fails for Koha to MARC mapping using biblio table
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Bug ID: 31239 Summary: search_for_data_inconsistencies.pl fails for Koha to MARC mapping using biblio table Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The script misc/maintenance/search_for_data_inconsistencies.pl search for invalid values using Koha to MARC mapping fields. The tables items and biblioitems are OK but mappings can be on biblio table : my $value = $table eq 'items' ? $i->$column : $i->biblioitem->$column; For example in UNIMARC if fails with error : The method Koha::Biblioitem->medium is not covered by tests! Trace begun at /home/koha/src/Koha/Object.pm line 880 Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x55c9a1905a40)') called at /home/koha/src/misc/maintenance/search_for_data_inconsistencies.pl line 196 -- 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=31239 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Which mapping caused the 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=31239 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #1)
Which mapping caused the error?
biblio.medium on 200$b UNIMARC -- 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=31239 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31299 -- 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=31239 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- How to recreate the problem in ktd using MARC21? -- 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=31239 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Jonathan Druart from comment #3)
How to recreate the problem in ktd using MARC21?
1) Go to framework BKS configuration 2) Edit 245$a to use an authorized value (in 'Other options'), like COUNTRY 3) Run ./misc/maintenance/search_for_data_inconsistencies.pl : You get error : == Wrong values linked to authorised values == The method Koha::Biblioitem->title is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x564382f7c7e8)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246 -- 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=31239 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Yes, that's what I tried yesterday, but I don't get the error. -- 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=31239 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #5)
Yes, that's what I tried yesterday, but I don't get the error.
I didn't have any biblio with frameworkcode="", I do recreate now. -- 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=31239 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21466 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21466 [Bug 21466] Data inconsistencies - koha fields linked to AV cat values must have a corresponding authorised value -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 138963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138963&action=edit Bug 31239: Fix incorrect AV linked to a mapped biblio column If an AV is linked to a MARC field mapped with a biblio column, the search_for_data_inconsistencies.pl script might explode with The method Koha::Biblioitem->title is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x556b67fa7168)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246 Test plan: For a given framework, pick a biblio using it Link 245$a with an authorised value category Run the script => Notice that with this script applied you will see the warning => Without this patch you got the error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |fridolin.somers@biblibre.co |y.org |m --- Comment #8 from Fridolin Somers <fridolin.somers@biblibre.com> --- I will QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 David Nind <david@davidnind.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=31239 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #138963|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 140413 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140413&action=edit Bug 31239: Fix incorrect AV linked to a mapped biblio column If an AV is linked to a MARC field mapped with a biblio column, the search_for_data_inconsistencies.pl script might explode with The method Koha::Biblioitem->title is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x556b67fa7168)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246 Test plan: For a given framework, pick a biblio using it Link 245$a with an authorised value category Run the script => Notice that with this script applied you will see the warning => Without this patch you got the error Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #140413|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140698&action=edit Bug 31239: Fix incorrect AV linked to a mapped biblio column If an AV is linked to a MARC field mapped with a biblio column, the search_for_data_inconsistencies.pl script might explode with The method Koha::Biblioitem->title is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Biblioitem=HASH(0x556b67fa7168)') called at misc/maintenance/search_for_data_inconsistencies.pl line 246 Test plan: For a given framework, pick a biblio using it Link 245$a with an authorised value category Run the script => Notice that with this script applied you will see the warning => Without this patch you got the error Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 140699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=140699&action=edit Bug 31239: (QA follow-up) Fixing ternary formatting Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|fridolin.somers@biblibre.co |m.de.rooy@rijksmuseum.nl |m | CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #11)
Created attachment 140699 [details] [review] Bug 31239: (QA follow-up) Fixing ternary formatting
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I totally disagree with this patch :D It's the formatting of perltidy, and this patch does not make it better. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- 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=31239 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #12)
(In reply to Marcel de Rooy from comment #11)
Created attachment 140699 [details] [review] [review] Bug 31239: (QA follow-up) Fixing ternary formatting
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I totally disagree with this patch :D It's the formatting of perltidy, and this patch does not make it better.
Damn, between the time I applied on my working branch and pushing you added this comment. I had doubts myself about that follow-up, as I tend to just call perltidy and this looked weird. I will keep an eye on those. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #14)
(In reply to Jonathan Druart from comment #12)
(In reply to Marcel de Rooy from comment #11)
Created attachment 140699 [details] [review] [review] [review] Bug 31239: (QA follow-up) Fixing ternary formatting
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I totally disagree with this patch :D It's the formatting of perltidy, and this patch does not make it better.
Damn, between the time I applied on my working branch and pushing you added this comment. I had doubts myself about that follow-up, as I tend to just call perltidy and this looked weird.
I will keep an eye on those.
Matter of taste? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Marcel de Rooy from comment #15)
(In reply to Tomás Cohen Arazi from comment #14)
(In reply to Jonathan Druart from comment #12)
(In reply to Marcel de Rooy from comment #11)
Created attachment 140699 [details] [review] [review] [review] [review] Bug 31239: (QA follow-up) Fixing ternary formatting
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
I totally disagree with this patch :D It's the formatting of perltidy, and this patch does not make it better.
Damn, between the time I applied on my working branch and pushing you added this comment. I had doubts myself about that follow-up, as I tend to just call perltidy and this looked weird.
I will keep an eye on those.
Matter of taste?
It is not really relevant, Marcel. I just wanted to point perltidy generates nice formatting and is encouraged, but it is all a matter of taste after all. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Maybe we should not use ternary inside ternary with if elsif else. But it works, that's the most important ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31239 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.07 released in| | CC| |lucas@bywatersolutions.com --- Comment #18 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=31239 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.07 |22.11.00, 22.05.07, released in| |21.11.14 CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable --- Comment #19 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- applied to 21.11 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=31239 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #20 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