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

Fix UI error when migrating virtual machine #4672

Merged

Conversation

mzazrivec
Copy link
Contributor

  1. Compute ➛ Infra ➛ Virtual Machines ➛ select a VM you can migrate ➛ Lifecycle ➛ Migrate Selected Items
  2. Switch tabs in the rendered form

Before, the following error would show:

FATAL -- : Error caught: [ActiveRecord::RecordNotFound] Couldn't find MiqTemplate without an ID.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.0.7/lib/active_record/relation/finder_methods.rb:456:in `find_with_ids'
.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.0.7/lib/active_record/relation/finder_methods.rb:66:in `find'
.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.0.7/lib/active_record/querying.rb:3:in `find'
.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/activerecord-5.0.7/lib/active_record/core.rb:151:in `find'
manageiq-ui-classic/app/controllers/application_controller/miq_request_methods.rb:31:in `prov_field_changed'

It seems that the @edit[:new][:src_vm_id] value is properly set only when provisioning a new machine.

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

@miq-bot
Copy link
Member

miq-bot commented Sep 17, 2018

Checked commit mzazrivec@511204b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

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

The Seal of Approval

@skateman
Copy link
Member

@miq-bot assign @martinpovolny

@martinpovolny martinpovolny merged commit 11a2c24 into ManageIQ:master Oct 2, 2018
@mzazrivec mzazrivec deleted the fix_error_when_migrating_vm branch October 2, 2018 09:58
@mzazrivec mzazrivec added this to the Sprint 96 Ending Oct 8, 2018 milestone Oct 2, 2018
@simaishi
Copy link
Contributor

simaishi commented Oct 3, 2018

@mzazrivec hammer/yes ?

@mzazrivec
Copy link
Contributor Author

@simaishi yup

simaishi pushed a commit that referenced this pull request Oct 4, 2018
@simaishi
Copy link
Contributor

simaishi commented Oct 4, 2018

Hammer backport details:

$ git log -1
commit 85b2357b221231a9190924bbeebb7d5d8d0d8fb8
Author: Martin Povolny <[email protected]>
Date:   Tue Oct 2 11:49:20 2018 +0200

    Merge pull request #4672 from mzazrivec/fix_error_when_migrating_vm
    
    Fix UI error when migrating virtual machine
    
    (cherry picked from commit 11a2c24f25a2ee2e5e26ce129531afbfbcc0694a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1628718

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.

5 participants