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 · May be fixed by #3881
Open

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

saschaszott opened this issue Sep 26, 2023 · 0 comments · May be fixed by #3881
Assignees
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Discovery related to discovery search or browse system

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
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog 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
@tdonohue tdonohue moved this from 🆕 Triage to 🙋 Needs Help / Unscheduled in DSpace Backlog May 1, 2024
@tdonohue tdonohue removed this from DSpace Backlog May 1, 2024
@YanaDePauw YanaDePauw linked a pull request Jan 22, 2025 that will close this issue
12 tasks
@tdonohue tdonohue added claimed: Atmire Atmire team is working on this issue & will contribute back and removed help wanted Needs a volunteer to claim to move forward labels Jan 22, 2025
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.x and 7.6.x Maintenance Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Discovery related to discovery search or browse system
Projects
Status: 🏗 In Progress
Development

Successfully merging a pull request may close this issue.

3 participants