Skip to content
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

value of defaultSortField in discovery.xml is not considered as default sort field #2524

Open
saschaszott opened this issue Sep 26, 2023 · 0 comments
Labels
bug component: Discovery related to discovery search or browse system help wanted Needs a volunteer to claim to move forward

Comments

@saschaszott
Copy link
Contributor

Bug Description

The value of <property name="defaultSortField" ref="xxx" /> is not considered as default sort field. Instead the first list value in <property name="sortFields"> is considered.

This bug is caused by this line in search.component.ts:

const defaultSort: SortOptions = searchSortOptions[0];

Steps to reproduce

Change the value of <property name="defaultSortField" ref="sortLastModified" /> to <property name="defaultSortField" ref="sortTitleAsc" /> in discovery.xml (bean with id workspaceConfiguration):

https://github.com/DSpace/DSpace/blob/96ba07197adbced95ffd743295e07bf7bb271953/dspace/config/spring/api/discovery.xml#L751

Restart the backend (reload the changed configuration)

Go to http://your-ds-host/mydspace?configuration=workspace

Observe that the default sort field is NOT changed to Title Ascending.

Expected behavior

In the given example: the default sort field is Title Ascending (sortTitleAsc)

@saschaszott saschaszott added bug needs triage New issue needs triage and/or scheduling labels Sep 26, 2023
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward component: Discovery related to discovery search or browse system and removed needs triage New issue needs triage and/or scheduling labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: Discovery related to discovery search or browse system help wanted Needs a volunteer to claim to move forward
Projects
Development

No branches or pull requests

2 participants