Bug 35903: In cataloguing authority plugin using autocomplete must set operator exact
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 25 Jan 2024 08:50:28 +0000 (09:50 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 29 Apr 2024 07:35:44 +0000 (09:35 +0200)
commit36d96180aea6e71d24da116343cd37bd723e808f
tree12d1411a5146042e2d9691d9c44fbf636cedcb51
parenta750c254da7cbb7e30c8b14af5b1e364536054d7
Bug 35903: In cataloguing authority plugin using autocomplete must set operator exact

When cataloguing and using authority plugin, there is auto-completion on inputs and default operator is "contains".
When using auto-completion and selecting a result it would be logical to set operator "exact".

See doc https://api.jqueryui.com/autocomplete/#event-select

This patch also adds auto-completion missing on "Search all headings".

Test plan:
1) Create a new authority Topical Term with heading "Cart"
2) Create a new authority Topical Term with heading "Carthage"
3) Create a new biblio record
4) Use authority plugin on field 650
5) You see current operator are "contains"
6) Enter "Car" in "Search main heading ($a only):"
7) You see auto-completion showing "Cart" and "Carthage"
8) Click on "Cart"
9) You see operator changes to "is exactly"
10) Submit form to see the results
11) Clear form and repeat 6-9 for the three other inputs

Signed-off-by: Michelle Spinney <mspinney@clamsnet.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc
koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js