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

Browse pages don't take into account sort configuration #8651

Open
ybnd opened this issue Jan 31, 2023 · 4 comments · May be fixed by DSpace/dspace-angular#2324 or DSpace/dspace-angular#3741
Open

Browse pages don't take into account sort configuration #8651

ybnd opened this issue Jan 31, 2023 · 4 comments · May be fixed by DSpace/dspace-angular#2324 or DSpace/dspace-angular#3741
Assignees
Labels
bug code task Code cleanup task component: Discovery Related to Discovery search or browse system configuration Related to out-of-the-box configuration

Comments

@ybnd
Copy link
Member

ybnd commented Jan 31, 2023

Describe the bug

Browse page results aren't sorted as configured in REST

To Reproduce

Steps to reproduce the behavior:

  1. Run a local DSpace instance with the following browse configuration
    webui.browse.index.1 = dateissued:item:dateissued:desc
    webui.browse.index.2 = author:metadata:dc.contributor.*\,dc.creator:text:desc:dateissued
    
  2. Open the "by issue date" browse page
    • Angular will send a request with sort=default,ASC
    • The response will be sorted by ascending date
  3. Re-send that request without the sort parameter
    • The response will be sorted by descending date, as configured
  4. Open the "by author" browse page
    • Angular will send a request with sort=default,ASC
    • The REST request will fail with HTTP 500, the following error will appear in the log
      2023-01-31 13:01:43,944 ERROR 2472f5f8-fc56-476e-9868-25549c647e08 755495a6-7d3f-43a8-9237-e3f25a13bb2b org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500)
      java.lang.IllegalStateException: The requested browse doesn't provide direct access to items you must specify a filter
      	at org.dspace.app.rest.repository.BrowseItemLinkRepository.listBrowseItems(BrowseItemLinkRepository.java:82) ~[classes/:?]
        ...
      

Expected behavior

  • When no sort direction is specified, browse pages should sort results as configured in REST.
  • When no sort direction is specified, Angular should update the "pagination component" to reflect the default sort direction as configured in REST.

General thoughts

While working on #8642 @YanaDePauw noted that browse could be replaced with discovery/Solr facets.
IMO this may be a more worthwhile time investment than maintaining it.

@ybnd ybnd added bug component: Discovery Related to Discovery search or browse system needs triage New issue needs triage and/or scheduling labels Jan 31, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Jan 31, 2023
@tdonohue
Copy link
Member

tdonohue commented Mar 8, 2023

This ticket sounds like it may be related to #8646 . As @mwoodiupui notes in that ticket, it appears that the webui.itemlist.sort-option.* settings in our dspace.cfg (which define the <sort-type> options available in browse) may not be fully functional in DSpace 7.

I haven't had a chance to dig into this at all, but I suspect we may have some "dead code" or "dead configs" here. Things that used to work in 6.x, but no longer work in 7.x. I agree that the approach here should either be to fix them, or possibly remove the dead code/configs to replace with Discovery/Solr configuration instead.

Moving this over to "Needs help" alongside that other ticket. Volunteers are welcome if anyone is interested in teasing this apart & finding a solution.

@tdonohue tdonohue added code task Code cleanup task configuration Related to out-of-the-box configuration help wanted Needs a volunteer to claim to move forward and removed needs triage New issue needs triage and/or scheduling labels Mar 8, 2023
@tdonohue tdonohue moved this from 🆕 Triage to 🙋 Needs Help / Unscheduled in DSpace Backlog Mar 8, 2023
@buithaihai
Copy link
Contributor

DLCorp would like to claim this issue, along with #8646 and #7957 since it makes sense to tackle all of them simultaneously and publish in one PR. Our estimation is 24 hours of contribution for all three.

@tdonohue
Copy link
Member

@buithaihai : Thanks. I'll assign this to you then. Feel free to work on all 3 at once if it's easiest.

@tdonohue
Copy link
Member

Reassigning to @jensvannerum as he's created a PR to fix this in DSpace/dspace-angular#3741

@tdonohue tdonohue removed the help wanted Needs a volunteer to claim to move forward label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code task Code cleanup task component: Discovery Related to Discovery search or browse system configuration Related to out-of-the-box configuration
Projects
Status: 🏗 In Progress
4 participants