I would like to suggest, if you have OverDrive (or other 3rd party databases) enabled on Koha, that Koha NOT push you straight into a record (detail.pl) if there is only one "Koha" result. You end up not being able to see OverDrive results, or switch over to OverDrive when it does that. Makes the connectivity useless for those with pin-point searching skills. When you enable one of these databases, that should be all you need to disable the default Koha behavior.
I know there are people who dislike the "if one result, go directly to it" functionality, without using OverDrive. So perhaps there could be a setting to disable just that, independently of other settings?
Can you think of any reason a library would choose to have a database (that they are probably paying for), and still want it to be bypassed and the search result go straight into the record? If so, then yes, having a separate control makes sense. But if not, why add another control? I can't think of any good reason to add more controls. It seems to complicate the desired affect, and makes more work for those that setup and manage the system. I think having this behavior disabled if a database is turned on if it produces a result on the results page. That is straight forward and logical, and the least amount of work for setup, and for troubleshooting.
Well, my thought was that are libraries that do not have OverDrive (or similar) who want to turn off the "if one result, go directly to it" functionality.
Well, there we have it. A great reason for a separate pref. :) Thanks for that. I'm on board with a separate pref then.
A library has asked me to implement this, at least for the OPAC. Any suggestions for what the syspref should be called?
Would something like OPACShowResultListOfOne work? OPACShowResultListOfOne = 0 => Current behaviour, go directly to detail view if there is only one hit OPACShowResultListOfOne = 1 => New behaviour, show the result list even if there is only one hit. And then: OPACShowResultListOfOne [Show|Don't show] the result list in a bibliographic search, if there is only one hit. Where Show = 1 Don't show = 0
(In reply to Magnus Enger from comment #6) > Would something like OPACShowResultListOfOne work? > > OPACShowResultListOfOne = 0 => Current behaviour, go directly to detail view > if there is only one hit > > OPACShowResultListOfOne = 1 => New behaviour, show the result list even if > there is only one hit. > > And then: > > OPACShowResultListOfOne [Show|Don't show] the result list in a bibliographic > search, if there is only one hit. > > Where > > Show = 1 > Don't show = 0 Looks good. You could also go with OPACAlwaysShowResults. Either would work, the latter being less specific.
Created attachment 120615 [details] [review] Bug 25885 - Show list of hits for one search result Default behaviour in Koha, for a bibliographic search that returns one hit is to skip the result list and go straight to the detail view of that one hit. This patch makes this behaviour configurable. To test: - Make sure you can do a search that returns exactly one hit - Apply this patch - Do the search and verify the default behaviour of skipping the result list and going straight to detail view is in place - Toggle the OPACShowResultListOfOne syspref and make sure the behaviour corresponds to the setting.
Created attachment 120811 [details] [review] Bug 25885 - Show list of hits for one search result Default behaviour in Koha, for a bibliographic search that returns one hit is to skip the result list and go straight to the detail view of that one hit. This patch makes this behaviour configurable. To test: - Make sure you can do a search that returns exactly one hit - Apply this patch - Do the search and verify the default behaviour of skipping the result list and going straight to detail view is in place - Toggle the OPACShowResultListOfOne syspref and make sure the behaviour corresponds to the setting. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Everything works good here and I'm signing off. One thing, the QA tool doesn't like the commit message because there is no ':' after 'Bug 25885'.
Your search returned 1 results.
Looks good. Please address comments 10 and 11.
*** This bug has been marked as a duplicate of bug 35728 ***