Bug 1430937 - Service Dialog does not save default value <None> for drop down or radio button
Summary: Service Dialog does not save default value <None> for drop down or radio button
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.7.2
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: service:dialog
Depends On: 1428133
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-09 22:41 UTC by Satoe Imaishi
Modified: 2022-07-09 08:24 UTC (History)
14 users (show)

Fixed In Version: 5.7.2.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1428133
Environment:
Last Closed: 2017-04-12 14:44:32 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Dropdown (112.07 KB, image/png)
2017-03-23 05:45 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0898 0 normal SHIPPED_LIVE Moderate: cfme, cfme-appliance, and cfme-gemset security, bug fix, and enhancement update 2017-04-12 18:31:08 UTC

Comment 2 Greg McCullough 2017-03-10 17:49:14 UTC
Euwe back-port: https://github.com/ManageIQ/manageiq/pull/14259

Comment 3 CFME Bot 2017-03-16 13:50:59 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/c40d9f6bf45118c40ed515d916742048c7492f39

commit c40d9f6bf45118c40ed515d916742048c7492f39
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Mar 15 17:53:02 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Mar 16 09:48:07 2017 -0400

    Merge pull request #14348 from eclarizio/BZ1428133-continuation
    
    Fix for TagControl issues after previous BZ1428133 fix
    (cherry picked from commit 0ff840b4ea54c3fea7a7b88a2f7ec350d5156664)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1430937

 app/models/dialog_field_tag_control.rb       |  11 +--
 spec/models/dialog_field_tag_control_spec.rb | 130 ++++++++++++++++++++++++---
 2 files changed, 122 insertions(+), 19 deletions(-)

Comment 4 CFME Bot 2017-03-16 15:45:56 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/3cd6f6e9f934ffc7a891d7b229fde008f3a5e7cd

commit 3cd6f6e9f934ffc7a891d7b229fde008f3a5e7cd
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Mar 16 18:49:41 2017 +0530
Commit:     Satoe Imaishi <simaishi>
CommitDate: Thu Mar 16 11:38:26 2017 -0400

    Merge pull request #694 from eclarizio/BZ1428133-continuation
    
    Fix for TagControl issues after previous BZ1428133 fix
    (cherry picked from commit 91643a2dee299ebe0180e4b3d45a1cfbeecb9094)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1430937

 app/helpers/application_helper/dialogs.rb          | 18 ++++++++---
 .../miq_ae_customization/_dialog_sample.html.haml  | 10 ++----
 .../_tag_field_values.html.haml                    |  2 +-
 app/views/shared/dialogs/_dialog_field.html.haml   | 14 +++-----
 spec/helpers/application_helper/dialogs_spec.rb    | 37 +++++++++++++++++++---
 5 files changed, 55 insertions(+), 26 deletions(-)

Comment 5 Shveta 2017-03-23 05:45:44 UTC
Created attachment 1265601 [details]
Dropdown

I selected "None" as the dropdown default value but that didn't get saved. 
Please check https://10.8.199.201 . Dialog - drop_down.

Comment 6 eclarizi 2017-03-23 14:57:38 UTC
I just looked on the reproducer and it seems to be working to me? "Required" is true, so instead of "None" it's going to be set to "Choose", so when I went into the dialog, "Choose" was set as the default. Before this fix, that shouldn't have even been possible.

I then changed the default value to "a", saved, and then went back and was able to change it back to "Choose". I also tried changing the required field to false, and then saved, and it correctly shifts the default to "None". You can then change the default value to "a", and change it back to "None".

Comment 7 Shveta 2017-03-23 16:24:36 UTC
Checked with Required True/False .
Works fine .
5.7.2.0.20170321181409_349f1b1

Comment 9 Shveta 2017-04-04 15:55:42 UTC
Hey Ryan, 

Yes I have verified this bug on 5.7.2.
Checked in 5.7.1 , it doesn't work.

Thanks, 
Shveta

Comment 10 errata-xmlrpc 2017-04-12 14:44:32 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:0898


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