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

Adjust filter by year range #3

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

megwalt
Copy link
Collaborator

@megwalt megwalt commented Dec 27, 2024

References

Fixes uoregon-libraries/sb-dspace7-rest#13

Description

Previously, the 'Filter by year' dropdown filter would only show the most recent year represented in the works. This fix fills in the years as expected (described below) between the earliest and latest years.

Expected year filling behavior based on updateStartsWithOptions() docstring:

In this implementation, it creates a list of years starting from the most recent item or the current year, going all the way back to the earliest date found on an item within this scope. The further back in time, the bigger the change in years become to avoid extremely long lists with a one-year difference. To determine the change in years, the config found under GlobalConfig.BrowseBy is used for this.

Screenshot

Year dropdown containing all years from 2018 to 2024

@megwalt megwalt changed the base branch from angular-7.6-demo to angular-7.6-demo-dev2 December 27, 2024 22:46
@megwalt megwalt merged commit e6e4aa4 into angular-7.6-demo-dev2 Dec 30, 2024
@megwalt megwalt deleted the bugfix/adjustBrowseYearRange branch December 30, 2024 18:10
@megwalt megwalt restored the bugfix/adjustBrowseYearRange branch January 3, 2025 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browse by issue date is not showing all years
1 participant