Bug 1496946 - setting a dynamic dialog to "required = True" is not saved
Summary: setting a dynamic dialog to "required = True" is not saved
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.8.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.8.2
Assignee: eclarizi
QA Contact: Leo Khomenko
URL:
Whiteboard:
Depends On: 1492150
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-28 19:23 UTC by Satoe Imaishi
Modified: 2022-07-09 08:53 UTC (History)
10 users (show)

Fixed In Version: 5.8.2.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1492150
Environment:
Last Closed: 2017-10-24 00:41:44 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3005 0 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2017-10-24 04:15:49 UTC

Comment 2 CFME Bot 2017-10-03 18:53:26 UTC
New commit detected on ManageIQ/manageiq-ui-classic/fine:
https://github.com/ManageIQ/manageiq-ui-classic/commit/22c1f1f1f70f2e495e742d3b34415aea54ced69e

commit 22c1f1f1f70f2e495e742d3b34415aea54ced69e
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Sep 18 19:41:49 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Tue Oct 3 14:44:36 2017 -0400

    Merge pull request #2185 from eclarizio/BZ1492150
    
    Ensure the 'required' property gets saved for dynamic drop down fields
    (cherry picked from commit ac02d7b602fc71702e4641f759c79ec14aee0436)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/controllers/miq_ae_customization_controller/dialogs.rb  |  1 +
 .../_dialog_field_form_dynamic_options.html.haml            | 13 ++++---------
 .../_dialog_field_form_non_dynamic_options.html.haml        | 11 +++--------
 3 files changed, 8 insertions(+), 17 deletions(-)

Comment 5 eclarizi 2017-10-05 19:15:26 UTC
I am able to reproduce the issue of switching from true to false and the false not saving and can have a fix for that shortly.

As for the main issue, when I have the required flag set, I'm not able to submit the dialog without choosing a value first. Can you attach the relevant dialog that is causing the issue? This might help explain some of the other issues you're seeing, and the part under "a bit more" seems to imply you're not using a dynamic dialog, which is what this BZ is referring to, and may be a different issue.

Comment 6 eclarizi 2017-10-09 16:17:26 UTC
Leo, do you have an update on this?

https://github.com/ManageIQ/manageiq-ui-classic/pull/2313 is the PR that should fix the issue of being able to un-set the required flag, but again I can't reproduce the issue of being able to submit a dialog even though a required field isn't filled out.

The second issue you listed with default values should probably be moved to a new BZ since this one is a blocker and to me, the second issue isn't related. When you make a new BZ, please attach the relevant offending dialog.

If you could attach that same dialog to this BZ as well, that would be very helpful.

Thanks

Comment 7 CFME Bot 2017-10-09 16:58:30 UTC
New commit detected on ManageIQ/manageiq-ui-classic/fine:
https://github.com/ManageIQ/manageiq-ui-classic/commit/e33276cfa07898d792a5257e9d65d32cfd052bff

commit e33276cfa07898d792a5257e9d65d32cfd052bff
Author:     Harpreet Kataria <hkataria>
AuthorDate: Mon Oct 9 12:18:33 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Oct 9 12:54:52 2017 -0400

    Merge pull request #2313 from eclarizio/allow_required_flag_for_all_dialog_field_types
    
    Allow required flag to be set/unset for all dialog field types
    (cherry picked from commit f40bb3ba78cd2d5e048da06398b46123d37ced2b)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/controllers/miq_ae_customization_controller/dialogs.rb | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comment 12 CFME Bot 2017-10-10 21:58:56 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/427689a692113bb437eabbf8202f8773a24f5e0a

commit 427689a692113bb437eabbf8202f8773a24f5e0a
Author:     Erik Clarizio <eclarizio>
AuthorDate: Tue Oct 10 13:21:03 2017 -0700
Commit:     Erik Clarizio <eclarizio>
CommitDate: Tue Oct 10 14:30:51 2017 -0700

    Add a blank option in drop down default value selections
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/helpers/application_helper/dialogs.rb          |  5 +-
 ...dialog_field_form_non_dynamic_options.html.haml |  2 +-
 spec/helpers/application_helper/dialogs_spec.rb    | 93 ++++++----------------
 3 files changed, 27 insertions(+), 73 deletions(-)

Comment 13 CFME Bot 2017-10-11 13:31:32 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/abd0108fc24bdd9e37ce06e7a4b796bbb324b01f

commit abd0108fc24bdd9e37ce06e7a4b796bbb324b01f
Author:     Erik Clarizio <eclarizi>
AuthorDate: Tue Oct 10 13:24:38 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Tue Oct 10 14:55:18 2017 -0700

    Refactor #values and #raw_values methods to improve default value setup
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/models/dialog_field_sorted_item.rb          |  32 +++-
 spec/models/dialog_field_drop_down_list_spec.rb | 195 +++++++++++++++++-------
 spec/models/dialog_field_sorted_item_spec.rb    |   3 +-
 3 files changed, 167 insertions(+), 63 deletions(-)

Comment 14 CFME Bot 2017-10-11 13:46:23 UTC
New commit detected on ManageIQ/manageiq/fine:
https://github.com/ManageIQ/manageiq/commit/aaec796806f3bbd2228644f95a678aefc8468a08

commit aaec796806f3bbd2228644f95a678aefc8468a08
Author:     Greg McCullough <gmccullo>
AuthorDate: Wed Oct 11 09:25:07 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Oct 11 09:43:55 2017 -0400

    Merge pull request #16167 from eclarizio/BZ1496946-part2
    
    Refactor #values and #raw_values methods to improve default value setup
    (cherry picked from commit a4ff07953ac5b3c6dae525c13a117431cdb2cca7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/models/dialog_field_sorted_item.rb          |  32 +++-
 spec/models/dialog_field_drop_down_list_spec.rb | 195 +++++++++++++++++-------
 spec/models/dialog_field_sorted_item_spec.rb    |   3 +-
 3 files changed, 167 insertions(+), 63 deletions(-)

Comment 15 CFME Bot 2017-10-11 13:48:41 UTC
New commit detected on ManageIQ/manageiq-ui-classic/fine:
https://github.com/ManageIQ/manageiq-ui-classic/commit/fc477cea4d42953c5cb37b29cc4d1f340658e003

commit fc477cea4d42953c5cb37b29cc4d1f340658e003
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Oct 10 17:56:50 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Oct 11 09:39:32 2017 -0400

    Merge pull request #2340 from eclarizio/BZ1496946-part2
    
    Add a blank option in drop down default value selections
    (cherry picked from commit 818ac60350306413a6a00240e85d1582ed9442b0)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1496946

 app/helpers/application_helper/dialogs.rb          |  5 +-
 ...dialog_field_form_non_dynamic_options.html.haml |  2 +-
 spec/helpers/application_helper/dialogs_spec.rb    | 93 ++++++----------------
 3 files changed, 27 insertions(+), 73 deletions(-)

Comment 18 errata-xmlrpc 2017-10-24 00:41:44 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:3005


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