Bug 32301: Fix default search sorting in advanced search when not editing a search
Bug 22605 changed the sorting to expect the passed parameter from the previous search, this broke default when the search page was loaded fresh. We should simply fallback from the edited search to the default if it is not set To test: 1) Go to staff client 2) Go to Advanced Search 3) Notice the default Sort By value is "Relevance" 4) Go to system preferences 5) Go to "defaultSortField" 6) Change the value of the system preference 7) Go back to Advanced Search and refresh the page 8) Notice that there are no changes, the default Sort By is still "Relevance" 9) Apply patch 10) Notice that changing the system preference now changes the default Sort By in Advanced Search 11) Perform a search, change the sorting, then edit the search 12) Confirm the correct sorting from the search is preserved Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
37bf88d252
commit
3489cdca1f
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@
|
||||||
<p>
|
<p>
|
||||||
<label for="sort_by">Sort by: </label>
|
<label for="sort_by">Sort by: </label>
|
||||||
<select id="sort_by" name="sort_by">
|
<select id="sort_by" name="sort_by">
|
||||||
[% INCLUDE 'resort_form.inc' sort_by = sort %]
|
[% INCLUDE 'resort_form.inc' sort_by = sort || sort_by %]
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
</fieldset> <!-- /#sortby -->
|
</fieldset> <!-- /#sortby -->
|
||||||
|
|
Loading…
Reference in a new issue