Bug 1390678 - MiqAeServiceMiqGroup missing relationship to Entitlement
Summary: MiqAeServiceMiqGroup missing relationship to Entitlement
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.8.0
Assignee: Lucy Fu
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate
Depends On:
Blocks: 1392082
TreeView+ depends on / blocked
 
Reported: 2016-11-01 16:28 UTC by Jeff Warnica
Modified: 2019-08-06 20:05 UTC (History)
10 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1392082 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:49:21 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jeff Warnica 2016-11-01 16:28:54 UTC
Testing 4.2b1 (5.7.0.7-beta1), and running CloudForms_Essentials code such as :

 @user.current_group.filters['managed'].flatten.each

fails; this seems intentional, as filters have moved to Entitlements. 

Conversation on slack suggests that current_group (MiqAeServiceMiqGroup) does not have .entitlement(s) as a relationship.

From rails console:

irb(main):043:0> vm.owner.current_group.entitlement
PostgreSQLAdapter#log_after_checkout......in use: 0, waiting_in_queue: 0
undefined method `entitlement' for #<MiqAeMethodService::MiqAeServiceMiqGroup:0x0000000d093b90>

Comment 4 CFME Bot 2016-11-04 17:41:25 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5e9e3af787c603ffb05a974db0b4f65663393485

commit 5e9e3af787c603ffb05a974db0b4f65663393485
Author:     Lucy Fu <lufu>
AuthorDate: Thu Nov 3 14:59:34 2016 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Thu Nov 3 14:59:34 2016 -0400

    Expose a group's filters in automate.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1390678

 lib/miq_automation_engine/service_models/miq_ae_service_miq_group.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 6 Milan Falešník 2017-03-29 16:30:37 UTC
Verified in 5.8.0.7:

irb(main):012:0> $evm.vmdb(:MiqGroup).find_by_description('mygrp').filters
=> {"managed"=>[["/managed/location/chicago", "/managed/location/london", "/managed/location/ny", "/managed/location/paris"]], "belongsto"=>["/belongsto/ExtManagementSystem|RHEV2"]}


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