[Bug 35452] New: Provide more info when using Link authorities automatically
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Bug ID: 35452 Summary: Provide more info when using Link authorities automatically Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: adolfo.rodriguez@xercode.es QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl There are records with many entries that can be linked to authorities, be it secondary authors (7xx) or subjects (6xx) As it is, when you use "Automatic authority link" the results list only indicate the field number, so you see something like this. * 650 - More than one local match found. Possibly a duplicate authority! * 650 - More than one local match found. Possibly a duplicate authority! * 650 - More than one local match found. Possibly a duplicate authority! * 700 - No matching authority found. * 700 - No matching authority found. * 700 - No matching authority found. To figure out which are the entries the results refer to you have to manually check the fields in the record. I think this could improved by adding info about the entries. Something like this. * 650 - Rock music. - More than one local match found. Possibly a duplicate authority! * 650 - Alternative rock music. - More than one local match found. Possibly a duplicate authority! * 650 - Country music. - More than one local match found. Possibly a duplicate authority! * 700 - Ikeda, Elaiza - No matching authority found. * 700 - Okada, Nana - No matching authority found. * 700 - Tsuchiya, Anna - No matching authority found. -- 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=35452 --- Comment #1 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 159408 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159408&action=edit Fix - Bug 35452 - Provide more info when using Link authorities automatically Test plan 1 Edit a record and add several 7xx and 6xx 2 Click on Link authorities automatically and check that the result only shows the field numbers 3 Apply patch, restart services 4 Click on Link authorities automatically and check that the result shows the field numbers and the info of the entry -- 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=35452 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> 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=35452 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159408|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 159416 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159416&action=edit Fix - Bug 35452 - Provide more info when using Link authorities automatically Test plan 1 Edit a record and add several 7xx and 6xx 2 Click on Link authorities automatically and check that the result only shows the field numbers 3 Apply patch, restart services 4 Click on Link authorities automatically and check that the result shows the field numbers and the info of the entry Signed-off-by: David Nind <david@davidnind.com> -- 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=35452 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |adolfo.rodriguez@xercode.es |ity.org | Text to go in the| |This enhancement adds more release notes| |useful information to the | |automatic authority link | |results when editing a | |record and using "Link | |authorities automatically". | |It now includes the value | |you used for each authority | |entry (such as 650$a and | |$700$a), so you know which | |ones to look at. | |Previously, it only | |included the field number, | |such as 650, and not the | |term. | | | |Example of new | |automatic authority link | |results: | |- 650 - Biologie. | |- More than one local match | |found. Possibly a duplicate | |authority! | |- 650 - Biology. | |- More than one local match | |found. Possibly a duplicate | |authority! | |- 700 - | |Aristophanes. - More than | |one local match found. | |Possibly a duplicate | |authority! | |- 700 - Beckett, | |Samuel, 1906-1989. - More | |than one local match found. | |Possibly a duplicate | |authority! CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- This is a nice enhancement! I've added an assignee and some release notes. Testing notes (using koha-testing-docker (KTD)): 1. Paste these terms in new 650$a or 700$a fields for a record, instead of using the tag editor: - 650$a: Biologie. - 650$a: Biology. - 700$a: Aristophanes. - 700$a: Beckett, Samuel, 1906-1989. 2. After the patch is applied, you get a more useful message of where to look to fix things up: Automatic authority link results: - 650 - Biologie. - More than one local match found. Possibly a duplicate authority! - 650 - Biology. - More than one local match found. Possibly a duplicate authority! - 700 - Aristophanes. - More than one local match found. Possibly a duplicate authority! - 700 - Beckett, Samuel, 1906-1989. - More than one local match found. Possibly a duplicate 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=35452 Nick Clemens <nick@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=35452 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159416|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 160590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160590&action=edit Bug 35452: Provide more info when using Link authorities automatically Test plan 1 Edit a record and add several 7xx and 6xx 2 Click on Link authorities automatically and check that the result only shows the field numbers 3 Apply patch, restart services 4 Click on Link authorities automatically and check that the result shows the field numbers and the info of the entry Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Provide more info when |Provide more info when |using Link authorities |using automatic authorities |automatically |linking -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but this change breaks the unit tests, please provide a follow-up: prove t/Biblio.t t/db_dependent/Biblio.t t/Biblio.t ............... ok t/db_dependent/Biblio.t .. 11/20 # Failed test 'The heading was not linked' # at t/db_dependent/Biblio.t line 812. # Structures begin differing at: # $got->{data} = 'Duplicated' # $expected->{data} = Does not exist # Failed test 'When AutoCreateAuthorities is enabled, multiple results are reported' # at t/db_dependent/Biblio.t line 826. # Structures begin differing at: # $got->{data} = 'Duplicated' # $expected->{data} = Does not exist # Looks like you failed 2 tests of 5. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 --- Comment #6 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- I don't think this change is the one breaking that test as it only adds info in the result. It doesn't affect in the search of the authority. It should be the change made in the bug 31185. Before that change, link authorities automatically didn't detect duplicate authorities and the result you got in those case was that the authority wasn't found. I think it's exactly the discrepancy you are seeing in the test, as it expects "Does not exist" and gets "Duplicated" https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31185 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 --- Comment #7 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- I think the bug 36938 covers the errors detected in the unit tests https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36938 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160590|0 |1 is obsolete| | --- Comment #8 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 201632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201632&action=edit Rebased patch — adds test coverage for new data field The original patch (attachment 160590) failed QA because t/db_dependent/Biblio.t expected {data} = Does not exist, but Bug 31185 had already changed that behavior. Bug 36938 fixed the test expectations for Bug 31185, but without the data field this patch introduces. This rebase applies cleanly against current main and updates the two is_deeply assertions in LinkBibHeadingsToAuthorities multiple results tests to include data => 'Duplicated' — matching the heading display text that the patch now includes in each details entry. Greetings, Adolfo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 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=35452 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 201635 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201635&action=edit Bug 35452: Provide more info when using Link authorities automatically When "Link authorities automatically" is run, the results dialog only shows field tag numbers, making it difficult to identify which authority term was linked or not linked. This patch adds the heading display text to each result entry so the user can see both the field tag and the actual term value. The previous patch (attachment 160590) failed QA because the test expectations in t/db_dependent/Biblio.t were written before Bug 31185 changed the authority duplicate detection behavior. Bug 36938 (already in main) fixed those test expectations, but did not account for the new 'data' field introduced by this patch. This rebased version updates the test expectations to include the heading display text. Steps to test: 1. Edit a bibliographic record and add several 6xx/7xx fields 2. Click "Link authorities automatically" — observe that the results dialog only shows field tag numbers (e.g. "650 - Not linked") 3. Apply this patch and restart services (Plack restart required if running under Plack) 4. Click "Link authorities automatically" again — confirm the dialog now shows both the tag and the term text (e.g. "650 - Science fiction - Not linked") 5. Run: prove t/db_dependent/Biblio.t 6. Confirm the two tests in "LinkBibHeadingsToAuthorities multiple results tests" pass (they previously failed due to Bug 31185 + Bug 36938 history) Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> 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=35452 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201632|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 --- Comment #10 from David Nind <david@davidnind.com> --- Notes: 1. The qa script complains about tidiness, you will need to fix this up for the QA Team: ... [FAIL] C4/Biblio.pm Result: [FAIL] C4/Biblio.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl C4/Biblio.pm` ... 2. I'm not sure how you are adding the patches to the bug, but if adding using koha-testing-docker (KTD), you should use: git bz attach -e 35452 HEAD -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201635|0 |1 is obsolete| | --- Comment #11 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 201642 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201642&action=edit Bug 35452: Provide more info when using Link authorities automatically — tidiness fix Tidiness fix for C4/Biblio.pm as reported in comment #10. Run perl misc/devel/tidy.pl C4/Biblio.pm and amended the commit. No logic changes — purely reformatting of push() blocks and trailing commas in hashrefs. Regarding the suggestion to use git bz attach: access to bugs.koha-community.org is protected by Anubis bot-detection, which blocks automated HTTP clients including git bz. I am attaching the patches manually via the web interface instead. Greetings, Adolfo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 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=35452 --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 201681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201681&action=edit Bug 35452: Provide more info when using Link authorities automatically When "Link authorities automatically" is run, the results dialog only shows field tag numbers, making it difficult to identify which authority term was linked or not linked. This patch adds the heading display text to each result entry so the user can see both the field tag and the actual term value. The previous patch (attachment 160590) failed QA because the test expectations in t/db_dependent/Biblio.t were written before Bug 31185 changed the authority duplicate detection behavior. Bug 36938 (already in main) fixed those test expectations, but did not account for the new 'data' field introduced by this patch. This rebased version updates the test expectations to include the heading display text. Steps to test: 1. Edit a bibliographic record and add several 6xx/7xx fields 2. Click "Link authorities automatically" — observe that the results dialog only shows field tag numbers (e.g. "650 - Not linked") 3. Apply this patch and restart services (Plack restart required if running under Plack) 4. Click "Link authorities automatically" again — confirm the dialog now shows both the tag and the term text (e.g. "650 - Science fiction - Not linked") 5. Run: prove t/db_dependent/Biblio.t 6. Confirm the two tests in "LinkBibHeadingsToAuthorities multiple results tests" pass (they previously failed due to Bug 31185 + Bug 36938 history) Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> 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=35452 --- Comment #13 from David Nind <david@davidnind.com> --- Still not sure how you are attaching patches. May pay to ask in the Mattermost Development channel, particularly if you are not using KTD 8-) For example, the patch should look like the one I signed off on, the one before is totally different (comment #11). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201642|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35452 --- Comment #14 from David Nind <david@davidnind.com> --- Thanks for fixing the tidiness 8-). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org