Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent induction start dates that are too early #47

Merged

Conversation

peteryates
Copy link
Member

I chose 1 September 2021 as the cutoff. Seems sensible but happy to change if there's a cause to be creating them before then.

image

@peteryates peteryates added the Bug Something isn't working label Jan 19, 2025
Copy link

Review app deployed to https://cpd-ec2-review-47-web.test.teacherservices.cloud

@peteryates peteryates force-pushed the prevent-induction-period-start-dates-that-are-too-early branch from b1407da to d7aa2bb Compare January 21, 2025 16:33
@peteryates peteryates requested a review from a team January 21, 2025 17:42
@emily-prudence-dfe
Copy link

@peteryates I tested this with TRN 3002585 and a date pre-September 2021 and just got one of these:
image

@peteryates peteryates force-pushed the prevent-induction-period-start-dates-that-are-too-early branch from d7aa2bb to d309f30 Compare January 24, 2025 12:43
@peteryates
Copy link
Member Author

@emily-prudence-dfe - I've fixed this and made as much of the validation overlaps between pending induction submissions and induction periods shared (rather than duplicated) so hopefully this works a bit better.

@peteryates peteryates force-pushed the prevent-induction-period-start-dates-that-are-too-early branch from d309f30 to 4e0d1b6 Compare January 27, 2025 11:34
@joe-harrison-dfe
Copy link
Contributor

@peteryates @emily-prudence-dfe reviewed this and all looks good, re-tried with the TRN Emily had problems with and validation error appears as it should. Happy to merge.

There's a chance we'll want to allow some earlier dates when importing
so maybe we should relax this rule for the migration.
Induction periods and pending induction submissions share a lot of
validation and we didn't have them perfectly aligned, which caused many
bugs.

This change introduces a shared place to put common validation, which
should hopefully make things easier to manage in the future.
@peteryates peteryates force-pushed the prevent-induction-period-start-dates-that-are-too-early branch from 4e0d1b6 to 318f386 Compare January 28, 2025 13:26
@peteryates peteryates merged commit 7741f93 into main Jan 28, 2025
16 checks passed
@peteryates peteryates deleted the prevent-induction-period-start-dates-that-are-too-early branch January 28, 2025 13:34
Copy link

Review app ECF2 deployed to https://ec2-review-47-web.test.teacherservices.cloud was deleted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants