Bug 1570613

Summary: Workload category for Tag Control element does not work
Product: Red Hat CloudForms Management Engine Reporter: Jan Zmeskal <jzmeskal>
Component: AutomateAssignee: eclarizi
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: low Docs Contact:
Priority: medium    
Version: 5.9.0CC: cpelland, mkanoor, obarenbo, rhrazdil, tfitzger, wfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1573246 (view as bug list) Environment:
Last Closed: 2019-02-11 14:04:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1573246    
Attachments:
Description Flags
Screenshot of order
none
editing dialog
none
tag table entries for workload
none
dialog results none

Description Jan Zmeskal 2018-04-23 10:42:49 UTC
Created attachment 1425637 [details]
Screenshot of order

Description of problem:
When you use Tag Control element in your Dialog and choose Workload as its Category, then the Catalog Item using this Dialog cannot be ordered. No value can be chosen for such element during ordering (see screenshot). 

Version-Release number of selected component (if applicable):
CFME 5.9.2.3
RHV 4.2.2.5

How reproducible:
100 %

Steps to Reproduce:
You can see Video reproduction or follow these instructions:
1. Go to Automation -> Automate -> Customization and create new Service Dialog
- The Dialog must containt Tag Control element
- Visible, Single Value and Required switches have to be on for the Tag Control element
- Category must be Workload for the Tag Control element
2. Go to Services -> Catalogs and create a new Catalog
3. Also create a new Catalog Item that is visible in your Catalog and uses your Service Dialog
4. Try to order your newly created Catalog Item

Actual results:
Catalog Item cannot be ordered since there are no options in the dropdown menu for Tag Control element.

Expected results:
I would expect to be offered the same range of options that I could see when I was choosing the Category for Tag Control element. 

Additional info:
- The same problem is encountered in self service UI
- If you use different Category with multiple options for your Tag Control element (for example Service Level), it works as expected

Comment 4 Greg McCullough 2018-04-23 13:21:28 UTC
Please review.  Seems similar to bug 1569470 but in this case there are configurations that do work.

Comment 5 William Fitzgerald 2018-04-23 15:13:57 UTC
I was able to reproduce on 5.9.2.3 , appliance: 10.8.196.225
Works on 5.8.3.4, appliance 10.8.196.214

Billy

Comment 7 William Fitzgerald 2018-04-24 21:33:23 UTC
Some of the tag categories don't work anymore (I tested the same ones in 5.8.3.4 and they work).

Edit the dialog.  Edit the field and select 'Workload' and save it.

The Edit Field Details show the proper values but if you edit the field again or save the dialog, the values aren't saved.

I think there is a disconnect between the Tag values and the Classifications values.

Workload should be using /managed/function In the tags table.  When you are editing the dialog field, it shows the correct tag values but doesn't save them.

Some are not working:

If I select category 'Workload', it needs to use the 'function' tag.
If I select category 'Provision Scope', it needs to use the 'prov_scope' tag.

Some are working:
If I select category 'Department', it uses the 'department' tag.
If I select category 'Exclusions', it uses the 'exclusions' tag.

Attaching some screenshots ...

Billy

Comment 8 William Fitzgerald 2018-04-24 21:36:36 UTC
Created attachment 1426275 [details]
editing dialog

Comment 9 William Fitzgerald 2018-04-24 21:37:51 UTC
Created attachment 1426276 [details]
tag table entries for workload

Comment 10 William Fitzgerald 2018-04-24 21:38:56 UTC
Created attachment 1426277 [details]
dialog results

Comment 11 William Fitzgerald 2018-04-25 13:32:05 UTC
Api.log info for workload: 

api.log:[----] I, [2018-04-24T16:43:30.051268 #12109:ae35bc]  INFO -- : MIQ(Api::ServiceDialogsController.log_request) Parameters:     {"action"=>"update", "controller"=>"api/service_dialogs", "format"=>"json", "body"=>{"action"=>"edit", "resource"=>{"label"=>"tag_control_dialog", "content"=>{"dialog_tabs"=>[{"created_at"=>"2018-04-23T14:36:42Z", "updated_at"=>"2018-04-23T14:36:42Z", "label"=>"New tab", "dialog_id"=>"2", "position"=>0, "dialog_groups"=>[{"created_at"=>"2018-04-23T14:36:42Z", "updated_at"=>"2018-04-24T20:33:59Z", "label"=>"New section", "dialog_tab_id"=>"48", "position"=>0, "dialog_fields"=>[{"name"=>"tag_control_1", "description"=>"", "data_type"=>"[FILTERED]", "display"=>"edit", "display_method_options"=>{}, "required"=>true, "required_method_options"=>{}, "default_value"=>"", "values"=>[], "values_method_options"=>{}, "options"=>{"force_single_value"=>true, "sort_by"=>"none", "sort_order"=>"ascending", "category_description"=>"Workload", "category_name"=>"workload", "category_id"=>"6"}, "created_at"=>"2018-04-23T14:36:42Z", "updated_at"=>"2018-04-24T20:33:59Z", "label"=>"Tag Control", "dialog_group_id"=>"48", "position"=>0, "reconfigurable"=>false, "dynamic"=>false, "show_refresh_button"=>false, "load_values_on_init"=>false, "read_only"=>false, "auto_refresh"=>false, "trigger_auto_refresh"=>false, "visible"=>true, "type"=>"DialogFieldTagControl", "resource_action"=>{"resource_type"=>"DialogField", "ae_attributes"=>{}}, "dialog_field_responders"=>[]}]}]}]}}}}

Comment 14 CFME Bot 2018-04-26 21:07:28 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/2a301f3087c65d88837749c4b8c87297045bd5d9
commit 2a301f3087c65d88837749c4b8c87297045bd5d9
Author:     Erik Clarizio <eclarizio>
AuthorDate: Thu Apr 26 16:24:23 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Thu Apr 26 16:24:23 2018 -0400

    Add name and id to category attribute list for dialog editor

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

 app/assets/javascripts/services/dialog_editor_http_service.js | 2 +-
 spec/javascripts/services/dialog_editor_http_service_spec.js | 34 +
 2 files changed, 35 insertions(+), 1 deletion(-)

Comment 15 CFME Bot 2018-04-26 21:13:29 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/e726ef4569941ffab35fd0142a8d4cf3f43c9346
commit e726ef4569941ffab35fd0142a8d4cf3f43c9346
Author:     Erik Clarizio <eclarizio>
AuthorDate: Thu Apr 26 16:25:38 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Thu Apr 26 16:25:38 2018 -0400

    Use the name of the category that comes from the API as category_name

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

 src/dialog-editor/components/modal/modalComponent.spec.ts | 5 +-
 src/dialog-editor/components/modal/modalComponent.ts | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Comment 18 Radim Hrazdil 2018-06-26 08:21:21 UTC
Verified following the test flow in the description that user is offered the same range of options in the dropdown menu element and an order can be placed.

Version 5.10.0.0.20180613200131_887cc81