Bug 29724 - Different authority usage count
Summary: Different authority usage count
Status: RESOLVED DUPLICATE of bug 26608
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: 21.05
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-17 16:07 UTC by Filipe Ribeiro
Modified: 2021-12-18 07:23 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filipe Ribeiro 2021-12-17 16:07:42 UTC
When searching for authorities, in the results table, the column "Used in" contains a different value from the counter shown at the details page of that authority.

The first count comes from https://github.com/Koha-Community/Koha/blob/v21.05.07/Koha/SearchEngine/Elasticsearch/Search.pm#L263

The second one comes from https://github.com/Koha-Community/Koha/blob/v21.05.07/Koha/Authorities.pm#L55

This last subroutine may return an incorrect value because the querybuilder adds a * at the end. Eg. "query": "(koha-auth-number:722*)"

Maybe we can replace simple_search_compat with count_auth_use
Comment 1 Fridolin Somers 2021-12-18 07:23:04 UTC
Indeed its a bug.

Already reported in Bug 26608

*** This bug has been marked as a duplicate of bug 26608 ***
Comment 2 Fridolin Somers 2021-12-18 07:23:28 UTC
Thanks for this report.

Best regards,