Bug 1448421 - Default value of dynamic dropdown list not honored CloudForms 4.2
Summary: Default value of dynamic dropdown list not honored CloudForms 4.2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.7.3
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: service
Depends On: 1447442
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-05 12:05 UTC by Satoe Imaishi
Modified: 2020-07-16 09:32 UTC (History)
9 users (show)

Fixed In Version: 5.7.3.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1447442
Environment:
Last Closed: 2017-06-28 15:01:40 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1601 0 normal SHIPPED_LIVE Important: CFME 5.7.3 security, bug fix and enhancement update 2017-06-28 18:51:52 UTC

Comment 2 CFME Bot 2017-05-12 13:56:11 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/65fdee7ad46aa9742401363cab0a33b53def659b

commit 65fdee7ad46aa9742401363cab0a33b53def659b
Author:     Greg McCullough <gmccullo@redhat.com>
AuthorDate: Thu May 4 16:37:10 2017 -0400
Commit:     Satoe Imaishi <simaishi@redhat.com>
CommitDate: Fri May 12 09:51:14 2017 -0400

    Merge pull request #14998 from eclarizio/BZ1447442
    
    Fix for default value of dynamic dropdown list not being honored
    (cherry picked from commit bfcb38b8e2b643aab302d4db1efe122b216eb352)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448421

 app/models/dialog_field_sorted_item.rb          |  9 +++--
 spec/models/dialog_field_drop_down_list_spec.rb | 52 +++++++++++++++++++++----
 2 files changed, 51 insertions(+), 10 deletions(-)

Comment 3 Shveta 2017-06-09 05:47:16 UTC
Fixed .
Verified in 5.7.3.1.20170608124102_4b35a9e
================
Method 
===============
dialog = $evm.object
dialog['data_type'] = "integer"
dialog['values'] = {0 => "zero", 1 => "one", 2 => "two"}
dialog['default_value'] = 1

"one" is selected in the dropdown because it's set to the default value.  Changed the keys to strings
({"0" => "zero", "1" => "one", "2" => "two"})
default value was not honored.

Comment 5 errata-xmlrpc 2017-06-28 15:01:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:1601


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