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

Filter search results by clicking on chart element for links with no params throws error #100

Open
jorgeltd opened this issue Oct 15, 2024 · 0 comments
Labels

Comments

@jorgeltd
Copy link

jorgeltd commented Oct 15, 2024

Describe the bug
DSpace version: 2023.02.04 and 2023.02.05
Tested on: Chrome, Opera

The functionality to filter a search result that includes a chart (pie, bar) by clicking on an element of the chart does not work if the route of the search result page does not include URL parameters.

When clicking an element of the chart, the console returns an error for trying to split the current URL string by the character "?"

chart_filter_error

To Reproduce
Steps to reproduce the behavior:

  1. Go to a search result page that includes a chart and no params in the URL, for example, the profile of a researcher https://dspacecris-demo.4science.cloud/entities/person/andreabollini.
  2. Open the browser console.
  3. Click on an element of any available chart, for example "research article" on the pie chart.
  4. Error will be logged in the console.
  5. Go to a search result page that includes a chart and filter params in the URL, for example, the profile of a researcher with a date range filter applied https://dspacecris-demo.4science.cloud/entities/person/andreabollini?f.dateIssued.min=1951.
  6. Click on an element of any available chart, for example "research article" on the pie chart.
  7. Current search result will be filtered to items with the "research article" dc.type.

Expected behavior
When clicking on the chart element, the current search results should be filtered using the value of the metadata from the chart, regardless of whether the search result page contains URL parameters or not.

Related work
None found

@jorgeltd jorgeltd added the bug label Oct 15, 2024
@jorgeltd jorgeltd changed the title Filter search by clicking on chart element on links with no params error Filter search results by clicking on chart element for links with no params throws error Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant