[Bug 21450] New: link_bibs_to_authorities.pl is caching searches without the auth type
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Bug ID: 21450 Summary: link_bibs_to_authorities.pl is caching searches without the auth type 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 It seems that the script stores the results of a search term using only the search term - not the authority type, this can be problematic Image A record containing both a subject and topic term: 650 _0 $aShort stories 655 __ $aShort stories And there being an authority record for each: Short stories AUTH_TYPE SU_TOPIC #1708 Short stories AUTH_TYPE GENRE #1709 The linker for the first stores: $cache->{Short stories} = 1708 and the genre link then reuses this search -- 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=21450 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- 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=21450 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 79600 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79600&action=edit Bug 21450: Cache authorities search using term and auth_type This is a simple fix to prevent incorrect caching of results when using link_bibs_to_authorities FIXME: This needs unit tests To test: 1 - Find or create a record with the same term in a subject and genre heading 2 - Find or create authority records for the term as a subject and genre type 3 - Run link bibs to authorities 4 - Verify both tags in the record are linked to the subject heading 5 - Aply patch 6 - Unlink the record and re-run the script (or just re-run) 7 - Each tag should be linked to correct authority -- 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=21450 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |joy@bywatersolutions.com, | |jzairo@bywatersolutions.com | |, katrin.fischer@bsz-bw.de, | |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=21450 Jessie Zairo <jzairo@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kelly@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
FIXME: This needs unit tests
Does that explain the NEW status ? -- 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=21450 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #2)
FIXME: This needs unit tests
Does that explain the NEW status ?
Indeed, I will try to get to this, but anyone is welcome to take it on -- 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=21450 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=21450 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79600|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 84340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84340&action=edit Bug 21450: Unit tests To test: 1 - Apply just this patch 2 - prove -v t/db_dependent/Linker_Default.t 3 - It fails 4 - Apply second patch 5 - prove -v t/db_dependent/Linker_Default.t 6 - It passes -- 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=21450 --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 84341 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84341&action=edit Bug 21450: Cache authorities search using term and auth_type This is a simple fix to prevent incorrect caching of results when using link_bibs_to_authorities To test: 1 - Find or create a record with the same term in a subject and genre heading 2 - Find or create authority records for the term as a subject and genre type 3 - Run link bibs to authorities 4 - Verify both tags in the record are linked to the subject heading 5 - Aply patch 6 - Unlink the record and re-run the script (or just re-run) 7 - Each tag should be linked to correct authority -- 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=21450 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=21450 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Frank Hansen <frank.hansen@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frank.hansen@ub.lu.se -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #6 from Frank Hansen <frank.hansen@ub.lu.se> --- Nice job! This patch applies and works fine for me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Frank, if you tested this, you can mark it sign off. An easy way to sign-off is using the sandboxes: https://wiki.koha-community.org/wiki/Sandboxes If you can't use them, it's good to at least switch the status and let us know how you want the sign-off line to look like (name + email) if different from your bugzilla account. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84341|0 |1 is obsolete| | --- Comment #8 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 89732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89732&action=edit Bug 21450: Cache authorities search using term and auth_type This is a simple fix to prevent incorrect caching of results when using link_bibs_to_authorities To test: 1 - Find or create a record with the same term in a subject and genre heading 2 - Find or create authority records for the term as a subject and genre type 3 - Run link bibs to authorities 4 - Verify both tags in the record are linked to the subject heading 5 - Aply patch 6 - Unlink the record and re-run the script (or just re-run) 7 - Each tag should be linked to correct authority Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Liz Rea <wizzyrea@gmail.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=21450 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84340|0 |1 is obsolete| | Attachment #89732|0 |1 is obsolete| | --- Comment #9 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 90076 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90076&action=edit Bug 21450: Unit tests To test: 1 - Apply just this patch 2 - prove -v t/db_dependent/Linker_Default.t 3 - It fails 4 - Apply second patch 5 - prove -v t/db_dependent/Linker_Default.t 6 - It passes Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 90077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90077&action=edit Bug 21450: Cache authorities search using term and auth_type This is a simple fix to prevent incorrect caching of results when using link_bibs_to_authorities To test: 1 - Find or create a record with the same term in a subject and genre heading 2 - Find or create authority records for the term as a subject and genre type 3 - Run link bibs to authorities 4 - Verify both tags in the record are linked to the subject heading 5 - Aply patch 6 - Unlink the record and re-run the script (or just re-run) 7 - Each tag should be linked to correct authority Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Liz Rea <wizzyrea@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #11 from Liz Rea <wizzyrea@gmail.com> --- Created attachment 90078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90078&action=edit Bug 21450: (QA follow-up) remove a couple of unused variables to make QA script happy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=21450 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #90076|0 |1 is obsolete| | Attachment #90077|0 |1 is obsolete| | Attachment #90078|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90088&action=edit Bug 21450: Unit tests To test: 1 - Apply just this patch 2 - prove -v t/db_dependent/Linker_Default.t 3 - It fails 4 - Apply second patch 5 - prove -v t/db_dependent/Linker_Default.t 6 - It passes Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90089&action=edit Bug 21450: Cache authorities search using term and auth_type This is a simple fix to prevent incorrect caching of results when using link_bibs_to_authorities To test: 1 - Find or create a record with the same term in a subject and genre heading 2 - Find or create authority records for the term as a subject and genre type 3 - Run link bibs to authorities 4 - Verify both tags in the record are linked to the subject heading 5 - Aply patch 6 - Unlink the record and re-run the script (or just re-run) 7 - Each tag should be linked to correct authority Signed-off-by: Frank Hansen <frank.hansen@ub.lu.se> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 90090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=90090&action=edit Bug 21450: (QA follow-up) remove a couple of unused variables to make QA script happy Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Nick, the Copyright of the tests need to be updated before push. Also I think that $h->{"$a$b"} is more readable than $h->{$a.$b}, but it can be debatable I guess :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #15)
Nick, the Copyright of the tests need to be updated before push.
Done, removed
Also I think that $h->{"$a$b"} is more readable than $h->{$a.$b}, but it can be debatable I guess :)
file a bug ;-P -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21450 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.05.00, 18.11.06 released in| | Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org