dspace-angular
dspace-angular copied to clipboard
Date facets component not working correctly
Describe the bug The discovery date facet does not work correctly when dates are prior to 1950. Here are some screenshots to illustrate.
Initial state:

Selecting date range after 1950

Selecting date range prior to 1950

Only the end date filter is applied for the earlier date range:

In SearchRangeFilterComponent.ts the date 1950 is the hard-coded "fallback minimum for the range". It looks like the repository's minimum could be obtained from the REST API response but I don't see that happening. Nor can I see where the minimum is defined in DSpace backend configuration (discovery.xml). So I'm not sure whether this is actually an Angular or REST issue.
Expected behavior Assuming that a minimum value must be provided, the minimum should be defined either in backend configuration and derived from the REST response, or failing that defined in Angular frontend configuration (so that a reasonable minimum can be set per local requirements).
Closely related to ticket https://github.com/DSpace/DSpace/issues/8418 (which might essentially be a different version of this same bug). These two tickets might be tackled together.
This and https://github.com/DSpace/DSpace/issues/8418 are probably related. The errant search string included in #8418 could be useful for troubleshooting.
we (at 4Science) are interested in working on that. It is not trivial as REST/contract changes are also required (estimation 16 hours). Min/max needs to be returned by the REST side. On the Angular side 1 day is required (we want also fix the event that trigger the search moving from dragging to end - click release). Estimation 24 hours in total
Thanks @abollini . That sounds reasonable...assigning you for your team to work on for 7.5
We've also seen this behavior. I wanted to add that the correct results page is briefly loaded, but then the visitor is redirected to the "end date: 1950" page. Navigating back one page takes you to the correct results.