-
Notifications
You must be signed in to change notification settings - Fork 360
Fix task page bugs #9479
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
base: master
Are you sure you want to change the base?
Fix task page bugs #9479
Conversation
checked_items = find_checked_items | ||
new_checked_items = [] | ||
checked_items.each do |item| | ||
if params["select-row-#{item}"] == "on" | ||
new_checked_items.push(item) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked_items = find_checked_items | |
new_checked_items = [] | |
checked_items.each do |item| | |
if params["select-row-#{item}"] == "on" | |
new_checked_items.push(item) | |
end | |
end | |
new_checked_items = find_checked_items.select { |item| params["select-row-#{item}"] == "on" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll be honest I don't understand what this code is saying. Do only newly checked items have the "select-row-" on? If we're deleting all checked items, why do we then only delete the newly checked items?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The delete button doesn't instantly delete the tasks, it instead queues their deletion. So when the table is reloaded and user resubmits it with the previous items checked off you don't want to queue their deletion again
232e988
to
9ddecb4
Compare
Checked commit GilbertCherrie@9ddecb4 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.62.0, and yamllint app/controllers/miq_task_controller.rb
|
Fix the delete on the tasks page.
Before:
Clicking delete on the task page made it seem like nothing was happening because no flash message would appear. The tasks are not deleted immediately, instead the deletion of the task is queued so it should alert the user of this in a flash message or else it seems like the task is not being deleted.
After:

This pr fixes this issue by alerting the user that the task deletion is queued and will occur.