[Bug 29486] New: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio (?)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Bug ID: 29486 Summary: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio (?) Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org C4::Biblio::_koha_marc_update_bib_ids is adding biblionumber and biblioitemnumber to the MARC record. When it may still be needed when a bibliographic record is added/edited, why do we need it for GetMarcBiblio? -- 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=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29307 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29307 [Bug 29307] marc record fetched twice in detail.pl -- 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=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com 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=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Good question. My guess might be coincidental record repair but that's not necessarily a good reason to keep it there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127682&action=edit Bug 29486: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio This subroutine is ensuring that the biblionumber and biblioitemnumber will be part of the MARC record. We should not need that, unless there is something broken somewhere else. This line has been added by the following commit: commit 4e95e94727b09b33d2f6c597bdd218a59dcc3681 Bug 6789: biblios with many items can result in broken search results link """ To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl, and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last). fix_biblio_ids is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it. """ But it does not explain why it's better to have it in GetMarcBiblio. If we need it for the reindexation process, we shouldn't impact GetMarcBiblio which is used from several different places. We might then consider adding the fix_biblio_ids call to rebuild_zebra.pl, but I am failing to understand in which cases it could be useful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi, | |nick@bywatersolutions.com, | |tomascohen@gmail.com Status|NEW |In Discussion --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This patch makes some tests fail, see t/db_dependent/Biblio.t When an update of biblio[item]number is made manually, the MARC record is (of course) not modified, and GetMarcRecord returns an "incorrect" record (ie. without the correct 999$c$d). Should we insist and remove this call? If so, should we provide a migration script and add a check to search_for_data_inconsistencies.pl? Which other situations this line was handling? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- A check to search_for_data_inconsistencies.pl +1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127682|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129608 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129608&action=edit Bug 29486: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio This subroutine is ensuring that the biblionumber and biblioitemnumber will be part of the MARC record. We should not need that, unless there is something broken somewhere else. This line has been added by the following commit: commit 4e95e94727b09b33d2f6c597bdd218a59dcc3681 Bug 6789: biblios with many items can result in broken search results link """ To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl, and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last). fix_biblio_ids is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it. """ But it does not explain why it's better to have it in GetMarcBiblio. If we need it for the reindexation process, we shouldn't impact GetMarcBiblio which is used from several different places. We might then consider adding the fix_biblio_ids call to rebuild_zebra.pl, but I am failing to understand in which cases it could be useful. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129609 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129609&action=edit Bug 29486: Fix tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129610 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129610&action=edit Bug 29486: Add check in search_for_data_inconsistencies.pl If the MARC record does not contain the correct biblionumber of biblioitemnumber, the script will display the following warning: == Bibliographic records have MARCXML without biblionumber or biblioitemnumber == * Biblionumber 4242 has '1' in 999$c * Biblionumber 4242 has biblioitemnumber '4242' but should be '1' in 999$d => The bibliographic records must have the biblionumber and biblioitemnumber in MARCXML -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|_koha_marc_update_bib_ids |_koha_marc_update_bib_ids |no longer needed for |no longer needed for |GetMarcBiblio (?) |GetMarcBiblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Note that we already have a script to fix the records: misc/batchRepairMissingBiblionumbers.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- - my $newincbiblioitemnumber=$biblioitemnumber+1; - $dbh->do("UPDATE biblioitems SET biblioitemnumber = ? WHERE biblionumber = ?;", undef, $newincbiblioitemnumber, $biblionumber ); my $updatedrecord = GetMarcBiblio({ Name of $updatedrecord might be a bit confusing now ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129608|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 131861 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131861&action=edit Bug 29486: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio This subroutine is ensuring that the biblionumber and biblioitemnumber will be part of the MARC record. We should not need that, unless there is something broken somewhere else. This line has been added by the following commit: commit 4e95e94727b09b33d2f6c597bdd218a59dcc3681 Bug 6789: biblios with many items can result in broken search results link """ To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl, and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last). fix_biblio_ids is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it. """ But it does not explain why it's better to have it in GetMarcBiblio. If we need it for the reindexation process, we shouldn't impact GetMarcBiblio which is used from several different places. We might then consider adding the fix_biblio_ids call to rebuild_zebra.pl, but I am failing to understand in which cases it could be useful. 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=29486 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129609|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 131862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131862&action=edit Bug 29486: Fix tests 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=29486 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #129610|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 131863 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131863&action=edit Bug 29486: Add check in search_for_data_inconsistencies.pl If the MARC record does not contain the correct biblionumber of biblioitemnumber, the script will display the following warning: == Bibliographic records have MARCXML without biblionumber or biblioitemnumber == * Biblionumber 4242 has '1' in 999$c * Biblionumber 4242 has biblioitemnumber '4242' but should be '1' in 999$d => The bibliographic records must have the biblionumber and biblioitemnumber in MARCXML 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=29486 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29697 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697 [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131861|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 131865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131865&action=edit Bug 29486: _koha_marc_update_bib_ids no longer needed for GetMarcBiblio This subroutine is ensuring that the biblionumber and biblioitemnumber will be part of the MARC record. We should not need that, unless there is something broken somewhere else. This line has been added by the following commit: commit 4e95e94727b09b33d2f6c597bdd218a59dcc3681 Bug 6789: biblios with many items can result in broken search results link """ To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl, and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last). fix_biblio_ids is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it. """ But it does not explain why it's better to have it in GetMarcBiblio. If we need it for the reindexation process, we shouldn't impact GetMarcBiblio which is used from several different places. We might then consider adding the fix_biblio_ids call to rebuild_zebra.pl, but I am failing to understand in which cases it could be useful. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131862|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 131866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131866&action=edit Bug 29486: Fix tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #131863|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 131867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=131867&action=edit Bug 29486: Add check in search_for_data_inconsistencies.pl If the MARC record does not contain the correct biblionumber of biblioitemnumber, the script will display the following warning: == Bibliographic records have MARCXML without biblionumber or biblioitemnumber == * Biblionumber 4242 has '1' in 999$c * Biblionumber 4242 has biblioitemnumber '4242' but should be '1' in 999$d => The bibliographic records must have the biblionumber and biblioitemnumber in MARCXML Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |martin.renvoize@ptfs-europe | |.com --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This makes a lot of sense and works as expected, no regressions found, tests passing and QA script happy Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.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=29486 --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.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=29486 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32332 CC| |magnus@libriotech.no -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33603 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33603 [Bug 33603] misc/maintenance/search_for_data_inconsistencies.pl fails if biblio.biblionumber on control field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.23 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29486 --- Comment #18 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 21.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org