DSpace / dspace-angular

DSpace User Interface built on Angular.io
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
128 stars 422 forks source link

Access condition start/end date limits can bleed over between available options #3003

Open ybnd opened 5 months ago

ybnd commented 5 months ago

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:

  1. Set up a local DSpace instance
  2. 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 UploadConfiguration under the original embargo ACO
  3. Start a submission, upload a file and open the "edit Bitstream modal"
  4. 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.

Related work Introduced in https://github.com/DSpace/dspace-angular/pull/1698

ybnd commented 5 months ago

Related to https://github.com/DSpace/dspace-angular/pull/2135 and https://github.com/DSpace/DSpace/pull/8698