Bug 7400 - Add auto-completion on auth_finder
Summary: Add auto-completion on auth_finder
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: 3.8
Hardware: All All
: P3 enhancement (vote)
Assignee: Matthias Meusburger
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks: 8875
  Show dependency treegraph
 
Reported: 2012-01-04 14:11 UTC by Matthias Meusburger
Modified: 2013-05-23 06:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (11.63 KB, patch)
2012-01-04 14:44 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 7400: Add auto-completion on auth_finder (11.89 KB, patch)
2012-01-07 16:47 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Proposed patch to pass qa (13.48 KB, patch)
2012-02-29 15:36 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Signed-off patch (13.54 KB, patch)
2012-03-02 20:07 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
proposed patch (13.50 KB, patch)
2012-03-09 14:44 UTC, Matthias Meusburger
Details | Diff | Splinter Review
Bug 7400: Add auto-completion on auth_finder (13.71 KB, patch)
2012-03-10 15:43 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Meusburger 2012-01-04 14:11:28 UTC
While typing an authority, will automatically propose authorities (similar to autocompletion for patron search if activated)
Comment 1 Matthias Meusburger 2012-01-04 14:44:13 UTC Comment hidden (obsolete)
Comment 2 Jared Camins-Esakov 2012-01-07 16:47:15 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2012-01-19 10:21:50 UTC
QA comment:
You add a new nsb_clean function. This function is already present in cataloguing/ysearch.pl.
Isn't better to factorize it in a C4 module ?

Why do you comment the "use warning" line ?
You can now use Modern::Perl instead of use strict; use warnings; :)
Comment 4 Matthias Meusburger 2012-02-29 15:36:09 UTC Comment hidden (obsolete)
Comment 5 Matthias Meusburger 2012-02-29 15:41:09 UTC
The nsb_clean function has been added to C4::Charset and removed from the two ysearch.pl

Indeed, "use warnings" had no reason to be commented. It has been removed and replaced by "use Modern::Perl" in both ysearch.pl's.
Comment 6 Jared Camins-Esakov 2012-03-02 20:07:44 UTC Comment hidden (obsolete)
Comment 7 Ian Walls 2012-03-05 12:41:42 UTC
Uses the Switch module, which I believe is considered deprecated for 5.12+.  See http://www.perlmonks.org/?node_id=931583.

Since 5.10, there is a built-in switch operator, then given/when syntax.  Since Koha is now based on 5.10 minimum, we can safely depend on this.  See http://perldoc.perl.org/perlsyn.html#Switch-statements.

Marking Failed QA until the dependency on Switch is removed.
Comment 8 Matthias Meusburger 2012-03-09 14:44:43 UTC Comment hidden (obsolete)
Comment 9 Jared Camins-Esakov 2012-03-10 15:43:31 UTC
Created attachment 8142 [details] [review]
Bug 7400: Add auto-completion on auth_finder

While typing an authority, will automatically propose authorities (similar to
autocompletion for patron search if activated)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Tested searching for authorities with and without autocomplete. Note that
this is most useful when used in the "Main entry" box instead of the
"Main entry ($a only)" box.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Corrected tabs to spaces in auth-finder-search.inc while resolving merge
conflict.
Comment 10 Ian Walls 2012-03-19 12:12:56 UTC
Now that the dependency on Switch has been removed, this code looks good to me.  Moves nsb_clean to C4/Charset.pm, which increases usability.

Marking as Passed QA
Comment 11 Paul Poulain 2012-03-19 17:24:23 UTC
patch pushed, but i'm wondering if we should not have a syspref to activate/desactivate all auto-completion things.
This one is not managed by any syspref, couldn't it be a performance problem for some libraries ?
Comment 12 Chris Cormack 2012-03-19 18:54:09 UTC
(In reply to comment #11)
> patch pushed, but i'm wondering if we should not have a syspref to
> activate/desactivate all auto-completion things.
> This one is not managed by any syspref, couldn't it be a performance problem
> for some libraries ?

I agree first thing I do is disable auto completes as it works the db hard.