Problem
In T392898: xLab: Add validation to the Duration field, we defined that the fields Start date and End date should both be required, and should be validated as such on submit when configuring experiments and instruments.
Following the principles of data minimization we should not collect data indefinitely.
Requiring an end date for an instrument reminds data collectors about this key principle. However, we want to reduce uncertainty and provide recommendations where possible, and make clear the implications of this end date.
Solution
Default the instrument's end date to the start of the next Fiscal Year.
(Why? Most data collection initiatives are linked to objectives and key results as part of our APP. Having a single date to review data collection activity end date means users will be able to plan that review and make the decision on a clear cadence, rather than having to set reminders.)
Acceptance criteria
- End date field defaults to July 1 of the next fiscal year: if on or after July 1, add two years; if before July 1, add one year Examples:
- If I create an instrument on May 4 2026, the data collection should default to end July 1 2027.
- If I create an instrument on July 2 2026, the data collection should default to end July 1 2028
- Users can set a different end date if they so choose
- Add copy to TKUI: Defaults to the end of the next complete fiscal year. Set a shorter date if your data collection should conclude sooner.
- End date (utc_end_dt column) should remain mandatory in the database (defined as NOT NULL)