Bug 1284424 - Tabs without element can be added in service dialog
Tabs without element can be added in service dialog
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity medium
: GA
: 5.6.0
Assigned To: Lucy Fu
Matouš Mojžíš
:
: 1291702 (view as bug list)
Depends On:
Blocks: 1293457
  Show dependency treegraph
 
Reported: 2015-11-23 05:16 EST by Milan Zázrivec
Modified: 2016-06-29 11:10 EDT (History)
12 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1230198
: 1293457 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:10:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Greg McCullough 2015-11-23 09:20:21 EST
Need to add some basic model validation.  Note: There is already a check to see if the dialog has fields but it is being done in the controller (app/controllers/miq_ae_customization_controller/dialogs.rb:1320) and seems like that should move into the model.

Following this pattern we should also add a check that each dialog group has a field.
Comment 5 John Prause 2015-12-15 08:20:33 EST
*** Bug 1291702 has been marked as a duplicate of this bug. ***
Comment 8 CFME Bot 2015-12-21 11:36:23 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5644bce24c5a0b7974047cf7c856fb791ee3d10d

commit 5644bce24c5a0b7974047cf7c856fb791ee3d10d
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 11:41:05 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Rename Dialog / DialogField#validate to #validate_field_data.
    
    This is the run-time validation that validate the data a user is entering into the dialog when running the dialogs.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 app/models/dialog.rb                   | 4 ++--
 app/models/dialog_field.rb             | 2 +-
 app/models/dialog_field_text_box.rb    | 2 +-
 app/models/resource_action_workflow.rb | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
Comment 9 CFME Bot 2015-12-21 11:36:29 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ccca39b20571e07b433d372e1377088ff3ea92e8

commit ccca39b20571e07b433d372e1377088ff3ea92e8
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 17:30:30 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Fix the test cases for DialogField#validate_field_data.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 spec/models/dialog_field_check_box_spec.rb | 14 +++++++-------
 spec/models/dialog_field_spec.rb           |  4 ++--
 spec/models/dialog_field_text_box_spec.rb  | 10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)
Comment 10 CFME Bot 2015-12-21 11:36:35 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5062542cde144ed8e1ef7cb55858575e8cfb61ab

commit 5062542cde144ed8e1ef7cb55858575e8cfb61ab
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Dec 8 18:05:38 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Let Dialog / DialogTab / DialogGroup validate their own child class.
    
    Add validation to ensure parent has at least one child element.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../miq_ae_customization_controller/dialogs.rb          | 17 +++++++----------
 app/models/dialog.rb                                    | 14 ++++++++++++++
 app/models/dialog_group.rb                              | 12 ++++++++++++
 app/models/dialog_tab.rb                                | 13 +++++++++++++
 4 files changed, 46 insertions(+), 10 deletions(-)
Comment 11 CFME Bot 2015-12-21 11:36:40 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/82f3b3701508e66c6cc51c7ac530ba2900cd088a

commit 82f3b3701508e66c6cc51c7ac530ba2900cd088a
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 17:29:50 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Add test cases for #validate_children method in Dialog / DialogTab / DialogGroup.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../dialogs_spec.rb                                | 77 ++++++++++++++++++++++
 spec/factories/dialog.rb                           |  2 +
 spec/factories/dialog_group.rb                     |  2 +
 spec/factories/dialog_tab.rb                       |  2 +
 spec/models/dialog_group_spec.rb                   | 18 +++++
 spec/models/dialog_spec.rb                         | 23 ++++++-
 spec/models/dialog_tab_spec.rb                     | 18 +++++
 7 files changed, 140 insertions(+), 2 deletions(-)
 create mode 100644 spec/models/dialog_group_spec.rb
 create mode 100644 spec/models/dialog_tab_spec.rb
Comment 12 CFME Bot 2015-12-21 11:36:46 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/7aa18ea46bdac38ba6d0999ac55fee9874be388d

commit 7aa18ea46bdac38ba6d0999ac55fee9874be388d
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Dec 9 13:57:21 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Fix specs due to the adding of validate callback Dialog#validate_children.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../dialogs_spec.rb                                | 93 +++++++++++-----------
 spec/models/resource_action_workflow_spec.rb       |  2 +-
 spec/services/dialog_import_service_spec.rb        |  8 +-
 3 files changed, 51 insertions(+), 52 deletions(-)
Comment 13 CFME Bot 2015-12-21 11:36:52 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/08616b3c2eb8c5f545d758c7be892b8bd15a2e59

commit 08616b3c2eb8c5f545d758c7be892b8bd15a2e59
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Dec 16 16:51:28 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 10:01:07 2015 -0500

    Remove dialog methods add_resource and add_resource! from the mixin.
    
    Those methods are from when we use to have a join table connecting the dialog components and we keep them around to avoid having to update the UI at the time.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 app/models/mixins/dialog_mixin.rb            | 15 ------
 spec/controllers/host_controller_spec.rb     |  4 +-
 spec/models/dialog_group_spec.rb             |  2 +-
 spec/models/dialog_spec.rb                   | 81 +++++++++-------------------
 spec/models/dialog_tab_spec.rb               |  2 +-
 spec/models/resource_action_workflow_spec.rb |  8 +--
 6 files changed, 34 insertions(+), 78 deletions(-)
Comment 14 CFME Bot 2015-12-22 09:49:47 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5edcd3c6aab781358ef416cabc7a848522f767d2

commit 5edcd3c6aab781358ef416cabc7a848522f767d2
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 11:41:05 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:00 2015 -0500

    Rename Dialog / DialogField#validate to #validate_field_data.
    
    This is the run-time validation that validate the data a user is entering into the dialog when running the dialogs.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 app/models/dialog.rb                   | 4 ++--
 app/models/dialog_field.rb             | 2 +-
 app/models/dialog_field_text_box.rb    | 2 +-
 app/models/resource_action_workflow.rb | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
Comment 15 CFME Bot 2015-12-22 09:49:52 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b83c65483e7c93bcae77237e2b45d820f1d53ba5

commit b83c65483e7c93bcae77237e2b45d820f1d53ba5
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 17:29:50 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:00 2015 -0500

    Add test cases for #validate_children method in Dialog / DialogTab / DialogGroup.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../dialogs_spec.rb                                | 77 ++++++++++++++++++++++
 spec/factories/dialog.rb                           |  2 +
 spec/factories/dialog_group.rb                     |  2 +
 spec/factories/dialog_tab.rb                       |  2 +
 spec/models/dialog_group_spec.rb                   | 18 +++++
 spec/models/dialog_spec.rb                         | 23 ++++++-
 spec/models/dialog_tab_spec.rb                     | 18 +++++
 7 files changed, 140 insertions(+), 2 deletions(-)
 create mode 100644 spec/models/dialog_group_spec.rb
 create mode 100644 spec/models/dialog_tab_spec.rb
Comment 16 CFME Bot 2015-12-22 09:49:57 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6727e21066d4ee817430a95f49cb0ef6810aa5e4

commit 6727e21066d4ee817430a95f49cb0ef6810aa5e4
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Thu Dec 3 17:30:30 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:00 2015 -0500

    Fix the test cases for DialogField#validate_field_data.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 spec/models/dialog_field_check_box_spec.rb | 14 +++++++-------
 spec/models/dialog_field_spec.rb           |  4 ++--
 spec/models/dialog_field_text_box_spec.rb  | 10 +++++-----
 3 files changed, 14 insertions(+), 14 deletions(-)
Comment 17 CFME Bot 2015-12-22 09:50:02 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=03665f59bba2aa3ee61332064cd6d8b541a87dd1

commit 03665f59bba2aa3ee61332064cd6d8b541a87dd1
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Dec 9 13:57:21 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:00 2015 -0500

    Fix specs due to the adding of validate callback Dialog#validate_children.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../dialogs_spec.rb                                | 93 +++++++++++-----------
 spec/models/resource_action_workflow_spec.rb       |  2 +-
 spec/services/dialog_import_service_spec.rb        |  8 +-
 3 files changed, 51 insertions(+), 52 deletions(-)
Comment 18 CFME Bot 2015-12-22 09:50:08 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=131feebc75f7ae69c260be8f0fa5ac6fa11c3727

commit 131feebc75f7ae69c260be8f0fa5ac6fa11c3727
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Tue Dec 8 18:05:38 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:00 2015 -0500

    Let Dialog / DialogTab / DialogGroup validate their own child class.
    
    Add validation to ensure parent has at least one child element.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 .../miq_ae_customization_controller/dialogs.rb          | 17 +++++++----------
 app/models/dialog.rb                                    | 14 ++++++++++++++
 app/models/dialog_group.rb                              | 12 ++++++++++++
 app/models/dialog_tab.rb                                | 13 +++++++++++++
 4 files changed, 46 insertions(+), 10 deletions(-)
Comment 19 CFME Bot 2015-12-22 09:50:13 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=90ff8773c17130ba764622fb8d744a830aa9f563

commit 90ff8773c17130ba764622fb8d744a830aa9f563
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Dec 16 16:51:28 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon Dec 21 15:42:01 2015 -0500

    Remove dialog methods add_resource and add_resource! from the mixin.
    
    Those methods are from when we use to have a join table connecting the dialog components and we keep them around to avoid having to update the UI at the time.
    https://bugzilla.redhat.com/show_bug.cgi?id=1284424

 app/models/mixins/dialog_mixin.rb            | 15 -----
 spec/controllers/host_controller_spec.rb     |  4 +-
 spec/models/dialog_group_spec.rb             |  2 +-
 spec/models/dialog_spec.rb                   | 95 ++++++++++------------------
 spec/models/dialog_tab_spec.rb               |  2 +-
 spec/models/resource_action_workflow_spec.rb |  8 +--
 6 files changed, 41 insertions(+), 85 deletions(-)
Comment 20 Matouš Mojžíš 2016-04-25 13:20:50 EDT
Verified in 5.6.0.4-beta2.3.20160421172650_719e256.
Before fix there could be another tab empty after first tab had an element.
Now I am not able to add an empty tab and without empty tabs ordering works.
Comment 22 errata-xmlrpc 2016-06-29 11:10:31 EDT
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/RHBA-2016:1348

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