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 value of validate_id in host form #5289

Merged
merged 1 commit into from Mar 1, 2019
Merged

Conversation

rvsia
Copy link
Contributor

@rvsia rvsia commented Feb 28, 2019

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1634794

Description of problem:
When 2 or more hosts are selected and edited, Alert 'Abandon changes' is displayed even when no changes are made by the user.

Steps to Reproduce:

  1. Have CFME appliance with added provider with some hosts
  2. Go to Compute -> Infrastructure -> Hosts
  3. Select 2 or more hosts and click Configuration -> Edit selected items
  4. Leave the page without making any changes

Actual results:
Alert asking whether to abandon changes is displayed

Expected results:
If no changes are made, no 'Abandon changes' alert should be displayed

Solution

  • validation_id was nil in template and blank in controller
  • => changed to null everywhere
  • it caused dirty state on the form (because the model and the copy was different)

Before (immediately after loading of the form)

screenshot from 2019-02-28 12-36-37

After (notice form buttons)

screenshot from 2019-02-28 12-36-15

@rvsia
Copy link
Contributor Author

rvsia commented Feb 28, 2019

@miq-bot add_label hammer/yes, bug, compute/infrastructure,

https://bugzilla.redhat.com/show_bug.cgi?id=1634794

* validation_id was null in template and blank in controller
* => changed to null everywhere
* it causes dirty state on the form (because the model and the copy was different)
@miq-bot
Copy link
Member

miq-bot commented Feb 28, 2019

Checked commit rvsia@6e66bc5 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.6-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@rvsia rvsia changed the title Fixes value of validation_id in host form Fixes value of validate_id in host form Feb 28, 2019
@mzazrivec mzazrivec self-assigned this Mar 1, 2019
@mzazrivec mzazrivec added this to the Sprint 106 Ending Mar 4, 2019 milestone Mar 1, 2019
@mzazrivec mzazrivec merged commit ef10b77 into ManageIQ:master Mar 1, 2019
@rvsia rvsia deleted the bz1634794 branch September 17, 2019 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants