dspace-angular
dspace-angular copied to clipboard
Access condition start/end date limits can bleed over between available options
Describe the bug Currently, the "access condition option submission forms" initialize the the date limits for the access condition inputs based on all available ACOs instead of the option that's currently selected. More specifically, the limit of the last available ACO with that limit will always be used; multiple ACOs with distinct limits can be configured in Spring, but will not work in the frontend.
Affects SubmissionSectionUploadFileEditComponent and probably also SubmissionSectionAccessesComponent (not tested).
To Reproduce Steps to reproduce the behavior:
- Set up a local DSpace instance
- In
access-conditions.xml, create a copy of theembargoACO- Change the name and Bean ID to e.g.
embargo1M - Set the
startDateLimitto+1MONTHS - Add it to the default
UploadConfigurationunder the originalembargoACO
- Change the name and Bean ID to e.g.
- Start a submission, upload a file and open the "edit Bitstream modal"
- Select the
embargoACO and open the start date selector- You will see that dates later than a month from today are not allowed, even though the ACO supports dates up to three years from today.
Expected behavior The start/end date limit of the currently selected option should be enforced in the UI.
Related work Introduced in https://github.com/DSpace/dspace-angular/pull/1698