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 the embargo ACO
Change the name and Bean ID to e.g. embargo1M
Set the startDateLimit to +1MONTHS
Add it to the default UploadConfigurationunder the original embargo ACO
Start a submission, upload a file and open the "edit Bitstream modal"
Select the embargo ACO 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.
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 alsoSubmissionSectionAccessesComponent
(not tested).To Reproduce Steps to reproduce the behavior:
access-conditions.xml
, create a copy of theembargo
ACOembargo1M
startDateLimit
to+1MONTHS
UploadConfiguration
under the originalembargo
ACOembargo
ACO and open the start date selectorExpected 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