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

SCJ-244: Limit trial length to 40 days #215

Merged
merged 2 commits into from
Jul 25, 2024

Conversation

duncan-oxd
Copy link
Collaborator

QA reported some problems when you put in a huge number like 999999 for the trial length.
After some discussion we decided to just limit it to a realistic number. I see there's already validation code in the data writer service:

            if (
                !bookingInfo.EstimatedTrialLength.HasValue
                || bookingInfo.EstimatedTrialLength.Value < 1
                || bookingInfo.EstimatedTrialLength.Value > 99
            )
            {
                throw new InvalidOperationException(
                    "HearingLength must be greater than zero and less than 100"
                );
            }

So I've limited the input to a maximum value of 99 to match that.

@duncan-oxd duncan-oxd requested a review from molund July 17, 2024 00:35
@duncan-oxd duncan-oxd self-assigned this Jul 17, 2024
@molund molund self-requested a review July 23, 2024 21:35
@duncan-oxd duncan-oxd force-pushed the feature/SCJ-244-step-3-trial-length branch from 5eecaf7 to f1a3e85 Compare July 24, 2024 00:14
@duncan-oxd
Copy link
Collaborator Author

Updated the code to limit the trial length input to 40 days where it was previously 99

@molund molund changed the title SCJ-244: Limit trial length to 99 days SCJ-244: Limit trial length to 40 days Jul 24, 2024
@duncan-oxd duncan-oxd merged commit 54e2c42 into develop Jul 25, 2024
3 checks passed
@duncan-oxd duncan-oxd deleted the feature/SCJ-244-step-3-trial-length branch July 25, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants