[Bug 28676] New: AutoCreateAuthorities can repeatedly generate authority records when using Default linker and heading is cached
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Bug ID: 28676 Summary: AutoCreateAuthorities can repeatedly generate authority records when using Default linker and heading is cached Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Bug 25189 avoided creating a new auth if the match_count was greater than 1, however, when we cache auth results we don't cache match_count, so if the same heading is searched, we will create a new record again: C4/Linker/Default.pm 38 if ( $self->{'cache'}->{$search_form.$auth_type}->{'cached'} ) { 39 $authid = $self->{'cache'}->{$search_form.$auth_type}->{'authid'}; 40 $fuzzy = $self->{'cache'}->{$search_form.$auth_type}->{'fuzzy'}; 41 } -- 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=28676 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=28676 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 122653 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122653&action=edit Bug 28676: Unit test -- 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=28676 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 122654 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122654&action=edit Bug 28676: Cache and retrieve match_count when searching a cached heading We use match_count to determine if a new authority record should be created, however, we were not adding this count to the cache, so if a record returned too many matches on first lookup, we would create a new record on the second lookup To test: 1 - Set Linker Module to 'Default' 2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink 3 - Add two copies of a single authority via Z39 4 - Add two headings for that authority to a bib record (e.g. a 610 and 710) 5 - Save the record and note a new authority is generated 6 - Repeat and see another is generated 7 - Apply patch 8 - Restart all the things 9 - Save the record again, no new authority created -- 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=28676 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Depends on| |25189 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25189 [Bug 25189] AutoCreateAuthorities can repeatedly generate authority records when using Default linker -- 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=28676 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 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=28676 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122653|0 |1 is obsolete| | --- Comment #3 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 124430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124430&action=edit Bug 28676: Unit test 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=28676 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122654|0 |1 is obsolete| | --- Comment #4 from Phil Ringnalda <phil@chetcolibrary.org> --- Created attachment 124431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124431&action=edit Bug 28676: Cache and retrieve match_count when searching a cached heading We use match_count to determine if a new authority record should be created, however, we were not adding this count to the cache, so if a record returned too many matches on first lookup, we would create a new record on the second lookup To test: 1 - Set Linker Module to 'Default' 2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink 3 - Add two copies of a single authority via Z39 4 - Add two headings for that authority to a bib record (e.g. a 610 and 710) 5 - Save the record and note a new authority is generated 6 - Repeat and see another is generated 7 - Apply patch 8 - Restart all the things 9 - Save the record again, no new authority created 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=28676 Joonas Kylmälä <joonas.kylmala@iki.fi> 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=28676 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #124430|0 |1 is obsolete| | Attachment #124431|0 |1 is obsolete| | --- Comment #5 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 125026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125026&action=edit Bug 28676: Cache and retrieve match_count when searching a cached heading We use match_count to determine if a new authority record should be created, however, we were not adding this count to the cache, so if a record returned too many matches on first lookup, we would create a new record on the second lookup To test: 1 - Set Linker Module to 'Default' 2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink 3 - Add two copies of a single authority via Z39 4 - Add two headings for that authority to a bib record (e.g. a 610 and 710) 5 - Save the record and note a new authority is generated 6 - Repeat and see another is generated 7 - Apply patch 8 - Restart all the things 9 - Save the record again, no new authority created Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@iki.fi QA Contact|testopia@bugs.koha-communit |joonas.kylmala@iki.fi |y.org | --- Comment #6 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Fixes the problem, also as well for link_bibs_to_authorities.pl where the same issue occurred. This patch doesn't update the match_count value to cache in the update_cache() function even though it should, but the function was already buggy before this (it didn't update correctly the fuzzy value), and I think what we should do there is call the get_link() with a parameter to tell ignore cache so it will correctly then populate the cache values – but it's out of scope for this bug. Passing QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Joonas Kylmälä <joonas.kylmala@iki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #125026|0 |1 is obsolete| | --- Comment #7 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 125027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125027&action=edit Bug 28676: Unit test Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 --- Comment #8 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- Created attachment 125028 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=125028&action=edit Bug 28676: Cache and retrieve match_count when searching a cached heading We use match_count to determine if a new authority record should be created, however, we were not adding this count to the cache, so if a record returned too many matches on first lookup, we would create a new record on the second lookup To test: 1 - Set Linker Module to 'Default' 2 - Enable AutoCreateAuthorities and BiblioAddsAuthorities and CatalogModuleRelink and LinkerRelink 3 - Add two copies of a single authority via Z39 4 - Add two headings for that authority to a bib record (e.g. a 610 and 710) 5 - Save the record and note a new authority is generated 6 - Repeat and see another is generated 7 - Apply patch 8 - Restart all the things 9 - Save the record again, no new authority created Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@iki.fi> --- (In reply to Joonas Kylmälä from comment #6)
Fixes the problem, also as well for link_bibs_to_authorities.pl where the same issue occurred. This patch doesn't update the match_count value to cache in the update_cache() function even though it should, but the function was already buggy before this (it didn't update correctly the fuzzy value), and I think what we should do there is call the get_link() with a parameter to tell ignore cache so it will correctly then populate the cache values – but it's out of scope for this bug.
Passing QA.
Forgot to attach the other patch, re-attached now with my sign-off again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, 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=28676 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.05 released in| | CC| |kyle@bywatersolutions.com --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.11.00,21.05.05 |21.11.00,21.05.05,20.11.11 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Version(s)|21.11.00,21.05.05,20.11.11 |21.11.00,21.05.05,20.11.11, released in| |20.05.17 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 20.05.x branch for 20.05.17 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.05,20.11.11, |21.11.00,21.05.05,20.11.11, released in|20.05.17 |20.05.17,19.11.23 Status|Pushed to oldoldstable |Pushed to oldoldoldstable CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #14 from wainuiwitikapark@catalyst.net.nz --- Backported to 19.11.x for 19.11.23 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28676 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org Resolution|--- |FIXED Status|Pushed to oldoldoldstable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org