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

Fixes #38059 - job wizard limit starts at to future only #932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MariaAga
Copy link
Member

@MariaAga MariaAga commented Dec 3, 2024

Limited most of the date pickers to be only in the future (expect the user input one).
Added an error shown when the "starts at" is in the past.
Set the default value to starts at one minute on the future.
Updated the useEffect to set errors on "future" and "recurring" schedule, and to remove them otherwise.
Since I added a timer in the useEffect I added test fixes/ adjustments.

Copy link
Contributor

@kmalyjur kmalyjur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the few things I commented on, it works great

@@ -432,7 +450,8 @@ export const JobWizard = ({ rerunData }) => {
valid.advanced &&
valid.schedule &&
!isSubmitting &&
!isStartsBeforeError,
!isStartsBeforeError &&
!isStartsAtError,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Next" button is enabled even when the isStartsAtError occurs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added restrictions to the schedule steps

<Alert
ouiaId="starts-at-error-alert"
variant="danger"
title={__("'Starts at' date must in the future")}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing word: "...date must be in the..."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed for both errors

@@ -16,3 +16,18 @@ export const StartsBeforeErrorAlert = () => (
<Divider component="div" />
</>
);

export const StartsAtErrorAlert = () => (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the file could be renamed so it's not confusing when it includes StartsAtErrorAlert now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to StartsErrorAlert

@MariaAga MariaAga force-pushed the fix-start-date-jobs branch from e9f88d1 to 57186da Compare December 17, 2024 14:04
Copy link
Contributor

@kmalyjur kmalyjur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, it can be merged - @adamruzicka can you please do it?

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.

2 participants