[Bug 30024] New: link_bibs_to_authorities.pl relies on CatalogModuleRelink
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Bug ID: 30024 Summary: link_bibs_to_authorities.pl relies on CatalogModuleRelink Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org This is confusing - CatalogModule Relink is described as: Do/Don't automatically relink headings that have previously been linked when saving records in the cataloging module. The cronjob interface is not the cataloging module? LinkerRelink describes itself in the DB: ('LinkerRelink','1',NULL,'If ON the authority linker will relink headings that have previously been linked every time it runs.','YesNo') In the cronjob: my $allowrelink = C4::Context->preference("CatalogModuleRelink") || ''; -- 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=30024 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |enica@bywatersolutions.com, | |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Sarah Cornell <sbcornell@cityofportsmouth.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbcornell@cityofportsmouth. | |com --- Comment #1 from Sarah Cornell <sbcornell@cityofportsmouth.com> --- I guess today's the day I bump a bunch of the authority linker bugs. This user expects "CatalogingModuleRelink = Do" to update links when I hit "Link Authorities automatically" in the cataloging module. And I expect "LinkerRelink = Do" to update links when the cron job runs. -- 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=30024 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- 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=30024 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 141038 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=141038&action=edit Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink This patch makes the trivial change of making the linker script rely on LinkerRelink instead of CatalogModuleRelink, which is confusing and incorrect (according to both sysprefs descriptions). To test: 1. Verify that relinking is now tied to the right syspref Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Sara Brown <sbrown@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31637 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- This definitely seems right, but I want to highlight what I see in the routine LinkBibHeadingsToAuthorities. When an existing link is found we check the value of 'allowrelink' as passed in AND the value of LinkerRelink: if ( defined $current_link && (!$allowrelink || !C4::Context->preference('LinkerRelink')) ) So really, it is currently controlled by both, and only enabling both causes relink beforehand Before | After LinkerRelink 0 + CatalogModuleRelink 0 = No relink | No relink LinkerRelink 1 + CatalogModuleRelink 0 = No relink | Relink LinkerRelink 0 + CatalogModuleRelink 1 = No relink | No relink LinkerRelink 1 + CatalogModuleRelink 1 = Relink | Relink It is worth noting - if we have a current link, but don't find an authority record (i.e. linked to missing record) we also check 'allowrelink' in addition to 'LinkerKeepStale' Relink + LinkerKeepStale 0 = Remove link (unless authrecord found in DB but not zebra) Relink + LinkerKeepStale 1 = Keep stale NoRelink + LinkerKeepStale 0 = Keep stale NoRelink + LinkerKeepStale 1 = Keep stale -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #4 from Magnus Enger <magnus@libriotech.no> --- (In reply to Nick Clemens from comment #3)
So really, it is currently controlled by both, and only enabling both causes relink beforehand
Does that mean this patch leads to a change in behaviour that might come as a surprise to some, or is it the intended effect of the patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Magnus Enger from comment #4)
(In reply to Nick Clemens from comment #3)
So really, it is currently controlled by both, and only enabling both causes relink beforehand
Does that mean this patch leads to a change in behaviour that might come as a surprise to some, or is it the intended effect of the patch?
The change in behaviour is intended. Currently things don't work the way they say they would - so I think it more likely for a user to be experiencing unexpected results now. After it will follow what the descriptions say will happen. It should be noted in the release notes, but is correcting a bug. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org --- Comment #6 from Phil Ringnalda <phil@chetcolibrary.org> --- Testing notes (with ktd): You can't just run link_bibs_to_authorities.pl, since bib 369 is unparseable and crashes it. Instead you have to find a single bib to run against with, e.g., --bib-limit=biblionumber=16 You can't relink anything but 6xx headings without bug 33277 Test plan: 1. Set the preferences AutoLinkBiblios and CatalogModuleRelink to "Don't" so you can cause something to be mislinked, set LinkerRelink to "Do" (those are all default values) and set EnableAdvancedCatalogingEditor to "Enable." 2. Load http://127.0.0.1:8081/cgi-bin/koha/cataloguing/editor.pl#catalog/16 and change subfield 9 for one of the subjects to a recognizably wrong value like 999999 and save, ensuring that it didn't get automatically relinked 3. misc/link_bibs_to_authorities.pl --bib-limit=biblionumber=16 should list "Number of bibs modified: 0" because CatalogModuleRelink is still "Don't" 4. Switch CatalogModuleRelink to "Do", misc/link_bibs_to_authorities.pl --bib-limit=biblionumber=16 should list "Number of bibs modified: 1" and reloading http://127.0.0.1:8081/cgi-bin/koha/cataloguing/editor.pl#catalog/16 should show the 999999 replaced with the correct authid 5. Apply patch, restart 6. Redo Step 1 and 2. 7. misc/link_bibs_to_authorities.pl --bib-limit=biblionumber=16 should list "Number of bibs modified: 1" and reloading http://127.0.0.1:8081/cgi-bin/koha/cataloguing/editor.pl#catalog/16 should show the 999999 replaced with the correct authid when you have CatalogModuleRelink at "Don't" and LinkerRelink at "Do". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Phil Ringnalda <phil@chetcolibrary.org> 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=30024 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #141038|0 |1 is obsolete| | --- Comment #7 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 150780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=150780&action=edit Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink This patch makes the trivial change of making the linker script rely on LinkerRelink instead of CatalogModuleRelink, which is confusing and incorrect (according to both sysprefs descriptions). To test: 1. Verify that relinking is now tied to the right syspref Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- What about: C4/Biblio.pm: LinkBibHeadingsToAuthorities( $linker, $record, $frameworkcode, C4::Context->preference("CatalogModuleRelink") || '', undef, $verbose ); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Please provide feedback -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 --- Comment #10 from Phil Ringnalda <phil@chetcolibrary.org> --- (In reply to Marcel de Rooy from comment #9)
Please provide feedback
Not that anyone wanted my often-confused feedback, but at least I'll give it :) That call is in BiblioAutoLink, which is only called by svc/cataloguing/automatic_linker.pl, which is called by the "Link authorities automatically" button in the basic bib editor. That seems pretty solidly CatalogModuleRelink. Or did you mean that BiblioAutoLink might look attractive to someone who isn't CatalogModule, and it should instead make callers give it a relink value so it wouldn't be wrong if a non-CatalogModule use appeared? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Phil Ringnalda from comment #10)
(In reply to Marcel de Rooy from comment #9)
Please provide feedback
Not that anyone wanted my often-confused feedback, but at least I'll give it :)
That call is in BiblioAutoLink, which is only called by svc/cataloguing/automatic_linker.pl, which is called by the "Link authorities automatically" button in the basic bib editor. That seems pretty solidly CatalogModuleRelink.
Or did you mean that BiblioAutoLink might look attractive to someone who isn't CatalogModule, and it should instead make callers give it a relink value so it wouldn't be wrong if a non-CatalogModule use appeared?
This is all correct - that call is out of the scope of this bug and should be a new issue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Kyle M Hall <kyle@bywatersolutions.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=30024 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #150780|0 |1 is obsolete| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 158354 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158354&action=edit Bug 30024: Make link_bibs_to_authorities.pl rely on LinkerRelink This patch makes the trivial change of making the linker script rely on LinkerRelink instead of CatalogModuleRelink, which is confusing and incorrect (according to both sysprefs descriptions). To test: 1. Verify that relinking is now tied to the right syspref Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.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=30024 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.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=30024 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00 |23.11.00,23.05.06 released in| | Patch complexity|--- |Trivial patch CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.06 |23.11.00,23.05.06,22.11.12 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30024 --- Comment #15 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Nice work everyone! Pushed to 22.11.x for next release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org