dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Date facets component not working correctly

Open mspalti opened this issue 3 years ago • 5 comments

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: Screen Shot 2022-07-12 at 11 09 03 AM

Selecting date range after 1950 Screen Shot 2022-07-12 at 11 10 52 AM

Selecting date range prior to 1950 Screen Shot 2022-07-12 at 11 12 20 AM

Only the end date filter is applied for the earlier date range: Screen Shot 2022-07-12 at 11 13 17 AM

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).

mspalti avatar Jul 12 '22 19:07 mspalti

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.

tdonohue avatar Jul 22 '22 14:07 tdonohue

This and https://github.com/DSpace/DSpace/issues/8418 are probably related. The errant search string included in #8418 could be useful for troubleshooting.

alawvt avatar Jul 22 '22 14:07 alawvt

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

abollini avatar Oct 20 '22 11:10 abollini

Thanks @abollini . That sounds reasonable...assigning you for your team to work on for 7.5

tdonohue avatar Oct 20 '22 21:10 tdonohue

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.

ddean4040 avatar Feb 27 '24 14:02 ddean4040