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 #36089 - Job wizard default to no hosts selected #784

Merged
merged 1 commit into from Feb 21, 2023

Conversation

MariaAga
Copy link
Member

@MariaAga MariaAga commented Feb 13, 2023

using the magic of 1=0 like ruby does at if displayed_search_query.blank? Host.where('1 = 0')

Checking if any of the host selections are selected after a user clicks the host input, if not it will show an error
Screenshot from 2023-02-20 20-26-14

@MariaAga
Copy link
Member Author

Need to change the message + logic to allow 0 hosts selected but not allow no host selection

@MariaAga
Copy link
Member Author

Redone the pr to treat the hosts field as a required field

@MariaAga MariaAga force-pushed the default_no_hosts branch 2 times, most recently from c5638e9 to 5d6437b Compare February 20, 2023 20:24
@adamruzicka
Copy link
Contributor

Once I fill in required inputs, it allows me to go to the review step and kick the job off even though no hosts are selected. Is that intentional?

@MariaAga
Copy link
Member Author

missed condition check in the last step, added it. review should be disabled if there are no hosts/search query

Copy link
Contributor

@adamruzicka adamruzicka left a comment

Choose a reason for hiding this comment

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

Works well

@adamruzicka adamruzicka merged commit 4b31ed7 into theforeman:master Feb 21, 2023
@adamruzicka
Copy link
Contributor

Thank you @MariaAga !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants