Skip to content

Conversation

GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Jun 16, 2025

Fixes: #9470

This pr fixes an issue where changing the attributes or roles doesn't properly enable/disable the save button on the button form

@GilbertCherrie GilbertCherrie requested a review from a team as a code owner June 16, 2025 19:39
@miq-bot miq-bot added the wip label Jun 16, 2025
@GilbertCherrie GilbertCherrie requested a review from jrafanie June 18, 2025 15:26
@GilbertCherrie GilbertCherrie added bug and removed wip labels Jun 18, 2025
@GilbertCherrie GilbertCherrie changed the title [WIP] test Fix button form save button validation Jun 18, 2025
@jrafanie
Copy link
Member

@GilbertCherrie I manually tested against #9470 and both issues are resolved. Now to review the code.

end
else # if new value and current value are not equal
@changed = session[:changed] = true
break
Copy link
Member

Choose a reason for hiding this comment

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

We might want to extract methods out of these conditional where you can give a decent name to the logic... it's going to be hard to test this in a unit test without smaller methods.

@jrafanie
Copy link
Member

The behavior changes look good but I think we need some unit tests for some of the complex logic you managed to figure out.

@GilbertCherrie GilbertCherrie force-pushed the fix_button_form_change_field_validation branch from 45630b9 to c441f4f Compare June 23, 2025 12:41
@miq-bot
Copy link
Member

miq-bot commented Jul 2, 2025

Checked commits GilbertCherrie/manageiq-ui-classic@c441f4f~...e506a50 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.62.0, and yamllint
1 file checked, 3 offenses detected

app/controllers/application_controller/buttons.rb

@GilbertCherrie GilbertCherrie force-pushed the fix_button_form_change_field_validation branch 4 times, most recently from d1470ab to 7d36eeb Compare August 7, 2025 15:46
@GilbertCherrie GilbertCherrie force-pushed the fix_button_form_change_field_validation branch from 7d36eeb to d0ce60d Compare August 11, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automation/Automate/Customization/Buttons/Edit form-save button isn't enabled/disabled correctly for "role access" or "attribute/value pairs"
3 participants