Skip to content

Retention period edge case#12421

Open
jo-pol wants to merge 1 commit into
IQSS:developfrom
DANS-KNAW-jp:retention-date
Open

Retention period edge case#12421
jo-pol wants to merge 1 commit into
IQSS:developfrom
DANS-KNAW-jp:retention-date

Conversation

@jo-pol
Copy link
Copy Markdown
Contributor

@jo-pol jo-pol commented Jun 2, 2026

Why we need this PR:

When you select a retention period the current date + one year is offered as an option but not allowed. The error message however says it is allowed.
image

What this PR does:

  • java validation subtracts one day from the minimal date to turn isBefore(...) into <= ...
  • end date: no longer checked nor reported

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer:

Suggestions on how to test this:

WEB-UI:

  • Add a file to a draft dataset, save the changes but do not publish.
  • Select retention period from edit files.
  • Pick edge cases from the calendar, type invalid edge case manually.

API:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Messages will now look like:
image

With a date over a thousand years in the future, you will no longer get the web-ui message:
datasetForm:fileRetentionDate: Validation Error: Value must be between 2027-06-01 and 3026-06-01.

Is there a release notes update needed for this change?:

Additional documentation:

- start date off by one
- end date: neither check nor report
@pdurbin pdurbin moved this to Ready for Triage in IQSS Dataverse Project Jun 2, 2026
@pdurbin pdurbin moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Jun 2, 2026
@pdurbin pdurbin added the Size: 3 A percentage of a sprint. 2.1 hours. label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

2 participants