Skip to content

Conversation

@himdel
Copy link
Contributor

@himdel himdel commented Dec 21, 2018

Right now, clicking the Set Ownership button on a nested list of images under a cloud provider redirects to /vm/ownership.

But image is not a vm, it's a template, so the url should be /miq_template/ownership.

The difference causes 2 bugs:

  • no form buttons are shown
  • affected items shows No records found

Fixing to use miq_template.

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


Looks like this was a bug, because in the nearest elsif, we're already checking whether params[:display] matches images, so it was probably also in the vm list by mistake.

Right now, clicking the Set Ownership button on a nested list of images under a cloud provider redirects to `/vm/ownership`.

But image is not a vm, it's a template, so the url should be `/miq_template/ownership`.

The difference causes 2 bugs:

* no form buttons are shown
* affected items shows No records found

Fixing to use miq_template.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1650507
@himdel
Copy link
Contributor Author

himdel commented Dec 21, 2018

Testing...

  1. go to Compute -> Cloud -> Providers
  2. click on a provider
  3. click on Images in the provider detail/overview screen (like /ems_cloud/3?display=images)
  4. select an image via the checkbox
  5. toolbar Configuration > Set ownership

@himdel
Copy link
Contributor Author

himdel commented Dec 21, 2018

Before:

before

After:

after

@himdel
Copy link
Contributor Author

himdel commented Dec 21, 2018

@simaishi I'm creating this against hammer only,
the same issue (in code) is present on master, but does not cause a blocker bug (thanks to #5046),
and this couldn't be easily backported because of a conflict with #4833.

If that doesn't sound right, #5113 is the exact same fix for master (same code, fixing less bugs, and specifically not fixing the one mentioned in this bz).

@miq-bot
Copy link
Member

miq-bot commented Dec 21, 2018

Checked commit https://github.com/himdel/manageiq-ui-classic/commit/121760d7ef6a86e0eb5f9c07285f389ce27287ce 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

app/controllers/mixins/actions/vm_actions/ownership.rb

@simaishi simaishi merged commit 8346267 into ManageIQ:hammer Jan 4, 2019
@simaishi simaishi added this to the Sprint 102 Ending Jan 7, 2019 milestone Jan 4, 2019
@himdel himdel deleted the ownership-images branch January 7, 2019 11:32
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.

4 participants