Added upper limit to browse by date (year)#2171
Conversation
303e3c0 to
4dd1b31
Compare
|
@tdonohue, fyi, the test failure for this PR appeared after I rebased main. I also see the same error intermittently when I build and test my copy of the main branch. Besides the test, the metadata browse component UI isn't working for main. The "back to results" button updates the page with items (not metadata). That actually aligns with the test failure. But I don't see the same UI problem on the demo site, which is odd. I think the problem is related to #2139, which was recently merged. I think given how the browse-by-metadata component works it's necessary to always set the If that's the case then I suppose the tests might fail intermittently due to execution order. I went ahead and reverted the one line change in |
|
@artlowel , I just verified a bug in main that was introduced in #2139. It popped up as a random test error when I was working on this PR. The problem is that the "all browse results" back button no longer works because of this change line: It's inside a subscription and no longer updates when params.value emits as undefined. I think that's causing the back button to return to a list of items instead of metadata values. Do you agree? If so, I've gone ahead and reverted that change in this PR.
|
|
@mspalti : I believe you are correct that there is a bug caused by #2139. However, reverting the change in #2139 seems to re-introduce some of the problems described in #2128 (solved by #2139). So, I wonder if the proper code here should be something more like this? The problems with the old logic are described in #2128 (the old |
There was a problem hiding this comment.
@mspalti : Tested this today and it works as described, so I'm basically a +1. I think you are correct that you've found a bug in browse-by-metadata-page updates... but, I'm not sure reverting it is the correct fix. See comment above and my inline comment below.
e7d61f8 to
521b7d4
Compare
|
@tdonohue, setting |
|
Thanks @mspalti ! I'll retest quickly and then get this merged. |
Description
Attempts to set an upper limit to the browse by year options. So for example if a collection contains publications from 2001- 2010 the first year in the dropdown list is 2010 (not 2023).
List of changes in this PR:
To test this, browse a collection in which no item has a date.issued value from 2023. The first year in the pulldown should match the most recent item in the collection. Note that if the most recent item doesn't have a properly formatted date then the year option will default to the current (2023) year.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lintyarn check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.