Bugzilla – Attachment 193254 Details for
Bug 41859
Authority search autocomplete results not consistent with search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41859: Authority search autocomplete results not consistent with search results
Bug-41859-Authority-search-autocomplete-results-no.patch (text/plain), 4.59 KB, created by
Janusz Kaczmarek
on 2026-02-16 14:35:19 UTC
(
hide
)
Description:
Bug 41859: Authority search autocomplete results not consistent with search results
Filename:
MIME Type:
Creator:
Janusz Kaczmarek
Created:
2026-02-16 14:35:19 UTC
Size:
4.59 KB
patch
obsolete
>From 3d1ca124d601d3a8df0b64b54dda0476435502b8 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Mon, 16 Feb 2026 14:09:31 +0000 >Subject: [PATCH] Bug 41859: Authority search autocomplete results not > consistent with search results > >When cataloging and using authority plugin, there is auto complete >feature. But hints it produces are not consistent with search >results made with the same operator. E.g. (with standard KTD test >data set) typing 'reusability' in 'Search main heading'/'Search >all headings'/'Search entire record' gives no hints but one result >("Computer software Reusability.") > >It does not seem logical. > >Test plan: >========== >1. Have a standard KTD installation. >2. Start cataloging. Open authority plugin for any controlled field > (e.g. 100). Start typing 'Peter' (in any input field) with the > intention to find a person with the first name Peter (observe > that search type is set to 'contains'). You will get no hints, > despite of the existence of some Peters in the authority file. >3. Press Search button. You will have a few results containing > 'Peter'. >4. This is not what we expect. We expect that the hints are consistent > with the search results. >5. Apply the patch ; clear the browser cache. >6. Repeat 2. You should get the hints now. >7. Change the search type to 'starts with'. Start typing 'Peter' - no > hints now. Start typing e.g. davi... - the are a few hints from > surnames. > >Sponsored-by: Ignatianum University in Cracow >--- > .../intranet-tmpl/prog/js/auth-finder-search.js | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >index 029d7258ed..afcc14146a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js >@@ -15,6 +15,7 @@ $(document).ready(function () { > // marclistanywhere > $("#value_any").autocomplete({ > source: function (request, response) { >+ const operator_value = $("#marclistanywhere").val(); > $.ajax({ > url: "/cgi-bin/koha/authorities/ysearch.pl", > dataType: "json", >@@ -25,7 +26,7 @@ $(document).ready(function () { > op: "do_search", > type: "intranet", > and_or: "and", >- operator: "start", >+ operator: operator_value, > orderby: "HeadingAsc", > querytype: "all", > }, >@@ -49,6 +50,7 @@ $(document).ready(function () { > // marclistheading > $("#value_match").autocomplete({ > source: function (request, response) { >+ const operator_value = $("#marclistheading").val(); > $.ajax({ > url: "/cgi-bin/koha/authorities/ysearch.pl", > dataType: "json", >@@ -59,7 +61,7 @@ $(document).ready(function () { > op: "do_search", > type: "intranet", > and_or: "and", >- operator: "start", >+ operator: operator_value, > orderby: "HeadingAsc", > querytype: "match", > }, >@@ -83,6 +85,7 @@ $(document).ready(function () { > // mainentry > $("#value_main").autocomplete({ > source: function (request, response) { >+ const operator_value = $("#mainentry").val(); > $.ajax({ > url: "/cgi-bin/koha/authorities/ysearch.pl", > dataType: "json", >@@ -93,7 +96,7 @@ $(document).ready(function () { > op: "do_search", > type: "intranet", > and_or: "and", >- operator: "start", >+ operator: operator_value, > orderby: "HeadingAsc", > querytype: "mainentry", > }, >@@ -117,6 +120,7 @@ $(document).ready(function () { > // mainmainentry > $("#value_mainstr").autocomplete({ > source: function (request, response) { >+ const operator_value = $("#mainmainentry").val(); > $.ajax({ > url: "/cgi-bin/koha/authorities/ysearch.pl", > dataType: "json", >@@ -127,7 +131,7 @@ $(document).ready(function () { > op: "do_search", > type: "intranet", > and_or: "and", >- operator: "start", >+ operator: operator_value, > orderby: "HeadingAsc", > querytype: "mainmainentry", > }, >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41859
:
193254
|
193271