Bug 21071 - Search results not sorting in staff client advanced search when only AdvancedSearchTypes checkboxes are used
Summary: Search results not sorting in staff client advanced search when only Advanced...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-13 11:17 UTC by Lucy Vaux-Harvey
Modified: 2020-11-30 21:45 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucy Vaux-Harvey 2018-07-13 11:17:36 UTC
Sorting of search results in the staff client advanced search does not work if you run a search using ONLY the Item types/Shelving locations/Collections checkbox limiters.  Reported on 17.11.05.  Tested and works correctly at 17.05.
Comment 1 Jonathan Druart 2018-07-16 14:34:58 UTC
Looks ok on master, can you define "does not work"?

Do you get an error? No result? Sort option is not selected?

Do you sort on the search result or the advanced search view?
Comment 2 Katrin Fischer 2018-07-19 06:13:23 UTC
I've just tested on a 17.11.06 installation in staff advanced search with itemtype checked + sort changed it seems to work ok.

Can you retest and give us an example? Maybe the URL with the search terms too?
Comment 3 Katrin Fischer 2019-02-10 00:20:45 UTC
I think I see what Lucy might have meant: When coming form advanced search, the sorting option used is not highlighted on the sort pulldown.

To test:
- Make sure  defaultSortField/defaultSortOrder are set to relevance
- Go to advanced search
- Check item type "Books" (assuming sample data)
- Search
- Open pull down for "Sort" on top
- Verify none of the options is 'checked'
- Change default sort to "title"
- Repeat steps - option is now checked
Comment 4 Katrin Fischer 2019-02-10 00:32:48 UTC
There is a mismatch between search parameters specifically for relevance:
When coming from the advanced search, the form uses: relevance
When doing a search on simple search: relevance_dsc

I know I could fix the highlighting, but I am not sure if search needs a fix instead.
Comment 5 Lucy Vaux-Harvey 2019-02-21 15:53:55 UTC
Hi, thanks for looking at this.  I've re-tested this on other installs and it does appear to be a local problem for this site.  I think this bug can be closed as the site will upgrade in the coming months.
Simply for interest, the URL that was generated when trying to change the sort filter was this:
/cgi-bin/koha/catalogue/search.pl?sort_by=author_za%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20&limit=mc-loc:%27%27PAMPH%27%27
Thanks
Comment 6 Katrin Fischer 2019-11-24 22:26:54 UTC
(In reply to Lucy Vaux-Harvey from comment #5)
> I think this bug can be
> closed as the site will upgrade in the coming months.