Bug 1219950

Summary: Dynamic drop down list does not accept first entry
Product: Red Hat CloudForms Management Engine Reporter: Shveta <sshveta>
Component: UI - OPSAssignee: eclarizi
Status: CLOSED ERRATA QA Contact: Milan Falešník <mfalesni>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: clasohm, cpelland, gmccullo, hkataria, jhardy, mfalesni, mfeifer, mpovolny, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.5.0.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1244796 (view as bug list) Environment:
Last Closed: 2015-12-08 13:08:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1244796    
Attachments:
Description Flags
err none

Description Shveta 2015-05-08 19:30:13 UTC
Created attachment 1023588 [details]
err

Description of problem:


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


How reproducible:


Steps to Reproduce:
1. create a dynamic list method (see below)
2. Create a Service Dialog that uses a dynamic drop down list
3. create a button or catalog item that uses the service dialog
3. when the button is executed try to submit using the default selection

Actual results:
An error message is thrown saying that a selection must be made

Expected results:


Additional info:
5.4.0.0.25.20150429111523_0455f87 

Method 
=====================
# Method for logging
def log(level, message)
  @method = 'Service Dialog Provider Select'
  $evm.log(level, "#{@method} - #{message}")
end

# Start Here
log(:info, " - Listing Root Object Attributes:") if @debug
$evm.root.attributes.sort.each { |k, v| $evm.log('info', "#{@method} - \t#{k}: #{v}") if @debug }
log(:info, "===========================================") if @debug

        dialog_field = $evm.object
        dialog_field['data_type'] = 'string'
        dialog_field['required']  = 'true'
        dialog_field['sort_by']   = 'value'
        dialog_field["values"] = [[1, "one"], [2, "two"], [10, "ten"], [50, "fifty"]]

Comment 2 CFME Bot 2015-06-02 17:16:48 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/020529b21bbcc030f5837dd178ad219be0157840

commit 020529b21bbcc030f5837dd178ad219be0157840
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu May 14 07:48:13 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri May 29 13:43:52 2015 -0700

    Allow dynamic drop down list to be submitted on first entry
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950

 vmdb/app/models/dialog_field_drop_down_list.rb     |  4 +++
 .../models/dialog_field_drop_down_list_spec.rb     | 34 ++++++++++++++++++++--
 2 files changed, 35 insertions(+), 3 deletions(-)

Comment 3 CFME Bot 2015-06-02 17:16:52 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0089ecda649a808667d0c17118ff13f82b3fe44e

commit 0089ecda649a808667d0c17118ff13f82b3fe44e
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri May 22 11:19:36 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri May 29 13:43:53 2015 -0700

    Set default value after sorting list to avoid submitting incorrect value
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950

 vmdb/app/models/dialog_field_drop_down_list.rb |  2 +-
 vmdb/app/models/dialog_field_sorted_item.rb    | 23 ++++++++++++++---------
 2 files changed, 15 insertions(+), 10 deletions(-)

Comment 4 CFME Bot 2015-06-02 17:16:55 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/d0bb218fd0b2188ff1e48b278308eb72cedf1ea1

commit d0bb218fd0b2188ff1e48b278308eb72cedf1ea1
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri May 29 13:39:26 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri May 29 13:43:53 2015 -0700

    Fix issue where default value was always being used
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950
    
    Use nil instead of "" as initial value
    Use @default_value instead of default_value as that was nil

 vmdb/app/models/dialog_field_drop_down_list.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comment 5 CFME Bot 2015-06-30 18:32:10 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=52f4d2a3f55620464d3ec6cce20aaa91f5df9ed2

commit 52f4d2a3f55620464d3ec6cce20aaa91f5df9ed2
Author:     Erik Clarizio <eclarizi>
AuthorDate: Thu May 14 07:48:13 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Tue Jun 30 08:12:53 2015 -0700

    Allow dynamic drop down list to be submitted on first entry
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950
    
    Conflicts:
    	vmdb/app/models/dialog_field_drop_down_list.rb

 vmdb/app/models/dialog_field_drop_down_list.rb     |  4 +++
 .../models/dialog_field_drop_down_list_spec.rb     | 34 ++++++++++++++++++++--
 2 files changed, 35 insertions(+), 3 deletions(-)

Comment 6 CFME Bot 2015-06-30 18:32:14 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4bc200c835cb27705107480e4ebffac0963c84ec

commit 4bc200c835cb27705107480e4ebffac0963c84ec
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri May 22 11:19:36 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Tue Jun 30 08:12:54 2015 -0700

    Set default value after sorting list to avoid submitting incorrect value
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950

 vmdb/app/models/dialog_field_drop_down_list.rb |  2 +-
 vmdb/app/models/dialog_field_sorted_item.rb    | 23 ++++++++++++++---------
 2 files changed, 15 insertions(+), 10 deletions(-)

Comment 7 CFME Bot 2015-06-30 18:32:18 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c865fb3923e20e15afa6abc59a71e9acb77d47f9

commit c865fb3923e20e15afa6abc59a71e9acb77d47f9
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri May 29 13:39:26 2015 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Tue Jun 30 08:12:54 2015 -0700

    Fix issue where default value was always being used
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1219950
    
    Use nil instead of "" as initial value
    Use @default_value instead of default_value as that was nil

 vmdb/app/models/dialog_field_drop_down_list.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comment 10 errata-xmlrpc 2015-12-08 13:08:48 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-2015:2551