-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not jump to single search result when jumpto is disabled #3131
Do not jump to single search result when jumpto is disabled #3131
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @ThoWagen, this is a good catch! However, do we really need to add a blockJumpto parameter? I thought the existing code to set jumpto to false was designed to have the same effect. Could it be we just need to check for a false jumpto in processJumpToOnlyResult
and the other changes are unnecessary?
(I'm happy to merge this as-is if there's a reason I'm overlooking for its necessity, but just wondering if we can simplify).
I was not sure if there are cases where jumpto is set to false in the query parameter but if jump_to_single_search_result=true there should still be a redirect. This would not be very intuitive but it is the current logic and I only wanted to fix this for combined searches. I can definitely change this if there are no unwanted side effects. |
@ThoWagen, the jumpto parameter as currently implemented should either be a positive integer (the index of the record to jump to), or false (indicating that jumping is explicitly disabled). So I think it's fair to say that
What do you think? |
That makes sense. I changed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and passes both the automated test suite and my own manual checks. I've just added a comment to the code to provide some additional context. Thanks again for catching and fixing this!
If one has jump_to_single_search_result set to true and only gets one result in a column of combined search one jumps to this record. This should not happen and is fixed in this PR.