[Bug 30641] New: Authority detail page shows wrong number of records using the authority
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30641 Bug ID: 30641 Summary: Authority detail page shows wrong number of records using the authority Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl You can see the wrong behaviour in a clean sample database with http://localhost:8081/cgi-bin/koha/authorities/detail.pl?authid=133 To test: * Test plan assumes you are using the ktd sample data * Staff interface > authorities * Search for agile * Verfiy the result list shows used by 2 records and this is correct (authority is linked to both of them) * Switch to authority detail page * Verify it shows 3 records use this authority * Verify this is incorrect (the second record is not linked to the authority) I suspect that the detail page doesn't do an exact/phrase search opposed to the other pages, finding also records with similar authority numbers? -- 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=30641 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20615 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20615 [Bug 20615] Add the link of number of times the authority are used in edit mode -- 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=30641 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ok, getting closer: The number on results and detail page match and are correct if AutoQueryTruncate is deactivated. -- 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=30641 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- And Elasticsearch is used. -- 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=30641 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Cant directly reproduce this under Zebra. I am inclined to think that it is related to Elastic search engine module. Please confirm. Did you work under Elastic? Would be nice if we just used ->get_usage_count doing something like simple_search_compat( 'an:' . $authid, 0, 0 ) The other call goes (under Zebra) via SearchAuthorities. -- 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=30641 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Cataloging |Searching - Elasticsearch QA Contact|testopia@bugs.koha-communit | |y.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=30641 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|20615 | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=20615 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20615 [Bug 20615] Add the link of number of times the authority are used in edit mode -- 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=30641 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Marcel, our investigation overlapped. The key factors are: Searchengine Elasticsearch AutoQueryTruncate ON (automatic truncation) -- 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=30641 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- The problematic one is get_usage_count - I found this while testing bug 20615 that uses it and shows the wrong number. Not sure what the result page does different... but it probably should all end up using the same and working code. -- 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=30641 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=30641 --- Comment #6 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134260&action=edit Bug 30641: Quote authority id 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=30641 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #6)
Created attachment 134260 [details] [review] Bug 30641: Quote authority id search
Not sure if you should solve it here. Elastic ? -- 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=30641 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #5)
The problematic one is get_usage_count - I found this while testing bug 20615 that uses it and shows the wrong number. Not sure what the result page does different... but it probably should all end up using the same and working code.
No, it is just a wrapper to SearchEngine code. -- 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=30641 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Marcel, can you explain the issue? We don't want to disable auto-truncate in general, so using "" like I think we have done in other places already makes sense to me. Nick, there is another query in Authorities.pm with an an-based search, maybe we should also fix that one? -- 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=30641 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- ... and we'll probably need a 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=30641 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looks like that Zebra has no problem with the an:"9" since it is a :w index in MARC21. In UNIMARC it is both :n and :w. But Zebra does not need it; SimpleSearch does not add the asterisks for truncation. Apparently, Elastic does because QueryBuilder is adding asterisks. Looks to me that this is actually a more general problem: Elastic's simple_search_compat is not 'simple' enough ;) The quotes are a workaround. Note: We are forming queries like an:1 in more places in code. -- 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=30641 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #12 from Magnus Enger <magnus@libriotech.no> --- (In reply to Katrin Fischer from comment #10)
... and we'll probably need a unit test
Should this be "Failed QA" then? -- 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=30641 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Magnus Enger from comment #12)
(In reply to Katrin Fischer from comment #10)
... and we'll probably need a unit test
Should this be "Failed QA" then?
-- 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=30641 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org