Bug 1657260 - Set Ownership over multiple items resets user/group
Summary: Set Ownership over multiple items resets user/group
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Martin Hradil
QA Contact: Antonin Pagac
Red Hat CloudForms Documentation
Depends On:
Blocks: 1657939
TreeView+ depends on / blocked
Reported: 2018-12-07 14:24 UTC by Martin Hradil
Modified: 2019-02-12 16:50 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1657939 (view as bug list)
Last Closed: 2019-02-12 16:50:27 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:

Attachments (Terms of Use)

Description Martin Hradil 2018-12-07 14:24:40 UTC
Description of problem:

When using Set Ownerships to change the owner user *or* group (not both) of multiple items, the other setting is reset to "none".

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1. Go to Compute > Infrastructure > Virtual Machines
2. make sure you have 2 VMs with different users and groups assigned as owners
3. Select 2+ machines, Configuration > Set Ownership
4. set User to "Don't change"
5. set Group to a specific group
6. save

Actual results:

Both items get set to the specific group,
both items' user is reset to nobody.

Expected results:

Both items get set to the specific group,
both items' user is unchanged.

Additional info:

This also works the other way around ... setting a user resets group, setting a group resets the user.

Present in gaprindashvili, hammer and master.

Comment 3 CFME Bot 2018-12-10 08:57:29 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

commit 3d8c0ef5f855e9da9bed443327f4198f162cf289
Author:     Martin Hradil <mhradil@redhat.com>
AuthorDate: Fri Dec  7 09:02:14 2018 -0500
Commit:     Martin Hradil <mhradil@redhat.com>
CommitDate: Fri Dec  7 09:02:14 2018 -0500

    Fix multi-target Set Ownership

    Since #1578, when doing Set Ownership over multiple items:

    * set user to a User, set group to dont-change
    ... user gets set to User, and group gets reset to nil

    * set group to a Group, set user to dont-change
    ... group gets set to Group, and user gets reset to nil

    This makes sure we don't reset groups or users unless asked to.

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

 app/controllers/mixins/actions/vm_actions/ownership.rb | 13 +-
 1 file changed, 7 insertions(+), 6 deletions(-)

Comment 5 CFME Bot 2018-12-10 21:22:14 UTC
New commit detected on ManageIQ/manageiq-ui-classic/hammer:

commit 848e3294fd46bd4d5907900d250e5a8308578d05
Author:     Milan Zázrivec <mzazrivec@redhat.com>
AuthorDate: Mon Dec 10 03:51:49 2018 -0500
Commit:     Milan Zázrivec <mzazrivec@redhat.com>
CommitDate: Mon Dec 10 03:51:49 2018 -0500

    Merge pull request #5064 from himdel/ownership

    Fix multi-target Set Ownership

    (cherry picked from commit 91bacce0abaad57424741dcff4653133e2f0b352)

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

 app/controllers/mixins/actions/vm_actions/ownership.rb | 13 +-
 spec/controllers/vm_infra_controller_spec.rb | 14 +
 2 files changed, 21 insertions(+), 6 deletions(-)

Comment 6 Antonin Pagac 2019-01-08 13:26:19 UTC
Verified with

Setting group ownership for multiple items now leaves the user ownership untouched and vice-versa.

Note You need to log in before you can comment on or make changes to this bug.