Bug 1463827 - Drop Down List Dialog does not keep default value for Integer type
Summary: Drop Down List Dialog does not keep default value for Integer type
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.0
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: automate:dialog
: 1471964 (view as bug list)
Depends On:
Blocks: 1468370 1475020
TreeView+ depends on / blocked
 
Reported: 2017-06-21 20:18 UTC by myoder
Modified: 2020-12-14 08:56 UTC (History)
15 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1468370 1475020 (view as bug list)
Environment:
Last Closed: 2018-03-06 14:47:21 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description myoder 2017-06-21 20:18:01 UTC
Description of problem:
The default value is not stored for a Dialog of type "Drop Down List" with value "Integer".  This is not a dynamic dialog. 

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

How reproducible:
Always

Steps to Reproduce:
1. Create a dialog with type "Drop Down List" and value "Integer"
2. Create 3 entries (1 => 1, 2 => 2, 3 =>3)
3. Set a default value either 1, 2, or 3

Actual results:
The default value is not stored in the dialog

Expected results:
The default value should be stored in the dialog

Additional info:
I have tested this with type "Radio Button" and value "Integer" and the default value is stored correctly.
Also, for type "Radio Button" and "Drop Down List" with value "String" the default value is stored correctly.

Comment 2 eclarizi 2017-06-22 18:09:56 UTC
This should be fixed by the same thing that fixed https://bugzilla.redhat.com/show_bug.cgi?id=1447442. Here's the Github PR: https://github.com/ManageIQ/manageiq/pull/14998

Comment 4 eclarizi 2017-06-23 22:05:38 UTC
It should be now, as my previous comment was incorrect.

Comment 6 CFME Bot 2017-06-27 18:21:42 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/efa7d4bbfdc940ecfabc77c0ba9f4c088551c559

commit efa7d4bbfdc940ecfabc77c0ba9f4c088551c559
Author:     Erik Clarizio <eclarizi>
AuthorDate: Tue Jun 27 07:44:29 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Tue Jun 27 10:43:24 2017 -0700

    Ensure values are cast to proper data_type for default_value comparison
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1463827

 app/models/dialog_field_sorted_item.rb          |  2 +-
 spec/models/dialog_field_drop_down_list_spec.rb |  4 +--
 spec/models/dialog_field_sorted_item_spec.rb    | 36 +++++++++++++++++++++++--
 3 files changed, 37 insertions(+), 5 deletions(-)

Comment 9 CFME Bot 2017-07-19 10:23:55 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/1e7673ee8386e0610aabce312a11dc8b4a118555

commit 1e7673ee8386e0610aabce312a11dc8b4a118555
Author:     Erik Clarizio <eclarizio>
AuthorDate: Mon Jul 17 09:56:56 2017 -0700
Commit:     Erik Clarizio <eclarizio>
CommitDate: Mon Jul 17 09:56:56 2017 -0700

    Ensure updated default_value select picker is properly initialized
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1463827

 app/controllers/miq_ae_customization_controller/dialogs.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comment 11 Satoe Imaishi 2017-08-24 16:03:13 UTC
*** Bug 1471964 has been marked as a duplicate of this bug. ***

Comment 12 Shveta 2017-10-18 18:46:31 UTC
Default value is stored in 5.9.0.2.20171010190026_0413a06


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