Bug 1335583 - Service Dialogue Check box not changing to r/w
Summary: Service Dialogue Check box not changing to r/w
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.5.5
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: service:dialog
Depends On: 1334938
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 14:40 UTC by John Prause
Modified: 2019-11-14 08:01 UTC (History)
9 users (show)

Fixed In Version: 5.5.5.2
Doc Type: Bug Fix
Doc Text:
In the previous version of CloudForms, read_only property was not recognized for all dynamic dialogs. As a result, when the automation code ran for ordering a service and $evm.object['read_only'] was set to false, the element remained as read_only, and did not change to read/write. With this update, read_only property is recognized for all dynamic dialogs and the issue is now resolved.
Clone Of: 1334938
Environment:
Last Closed: 2016-07-26 15:34:22 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1488 normal SHIPPED_LIVE CFME 5.5.5 bug fixes and enhancement update 2016-07-26 19:28:27 UTC

Comment 1 CFME Bot 2016-05-24 16:39:40 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=fa49506c18d9c676bcf00d14cfbc671897d95a38

commit fa49506c18d9c676bcf00d14cfbc671897d95a38
Author:     Erik Clarizio <eclarizi@redhat.com>
AuthorDate: Wed May 18 08:19:07 2016 -0700
Commit:     Erik Clarizio <eclarizi@redhat.com>
CommitDate: Thu May 19 11:28:27 2016 -0700

    Ensure read_only property is recognized for all dynamic dialogs
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1335583

 app/assets/javascripts/dialog_field_refresh.js     | 16 +++++++++++
 app/models/dialog_field_check_box.rb               |  2 +-
 app/models/dialog_field_date_control.rb            |  2 +-
 app/models/dialog_field_date_time_control.rb       |  7 +++--
 app/models/dialog_field_drop_down_list.rb          |  2 +-
 app/models/dialog_field_radio_button.rb            |  2 +-
 app/models/dialog_field_text_box.rb                |  2 +-
 spec/javascripts/dialog_field_refresh_spec.js      | 32 ++++++++++++++++++++++
 spec/models/dialog_field_check_box_spec.rb         |  4 +--
 spec/models/dialog_field_date_control_spec.rb      |  4 +--
 spec/models/dialog_field_date_time_control_spec.rb |  9 +++---
 spec/models/dialog_field_drop_down_list_spec.rb    |  8 ++++--
 spec/models/dialog_field_radio_button_spec.rb      |  4 +--
 spec/models/dialog_field_text_box_spec.rb          |  4 +--
 14 files changed, 75 insertions(+), 23 deletions(-)

Comment 2 CFME Bot 2016-05-24 16:39:46 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b4ca2057156521e048938a1a75b897e92f8c7616

commit b4ca2057156521e048938a1a75b897e92f8c7616
Author:     Erik Clarizio <eclarizi@redhat.com>
AuthorDate: Thu May 19 12:55:09 2016 -0700
Commit:     Erik Clarizio <eclarizi@redhat.com>
CommitDate: Thu May 19 12:55:09 2016 -0700

    Fix broken specs
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1335583

 app/assets/javascripts/dialog_field_refresh.js | 4 ++--
 spec/javascripts/dialog_field_refresh_spec.js  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comment 3 CFME Bot 2016-05-24 16:39:57 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f12416536cace5f434bc14b1f6ab041aad2a7e70

commit f12416536cace5f434bc14b1f6ab041aad2a7e70
Merge: 8cbf912 b4ca205
Author:     Greg McCullough <gmccullo@redhat.com>
AuthorDate: Tue May 24 12:24:23 2016 -0400
Commit:     Greg McCullough <gmccullo@redhat.com>
CommitDate: Tue May 24 12:24:23 2016 -0400

    Merge branch 'MR-for-PR8784' into '5.5.z'
    
    Service Dialogue Check box not changing to r/w
    
    Ensure read_only property is recognized for all dynamic dialogs
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1335583
    
    This was a clean cherry-pick from: https://github.com/ManageIQ/manageiq/pull/8784
    
    See merge request !945

 app/assets/javascripts/dialog_field_refresh.js     | 18 ++++++++++-
 app/models/dialog_field_check_box.rb               |  2 +-
 app/models/dialog_field_date_control.rb            |  2 +-
 app/models/dialog_field_date_time_control.rb       |  7 +++--
 app/models/dialog_field_drop_down_list.rb          |  2 +-
 app/models/dialog_field_radio_button.rb            |  2 +-
 app/models/dialog_field_text_box.rb                |  2 +-
 spec/javascripts/dialog_field_refresh_spec.js      | 36 ++++++++++++++++++++--
 spec/models/dialog_field_check_box_spec.rb         |  4 +--
 spec/models/dialog_field_date_control_spec.rb      |  4 +--
 spec/models/dialog_field_date_time_control_spec.rb |  9 +++---
 spec/models/dialog_field_drop_down_list_spec.rb    |  8 +++--
 spec/models/dialog_field_radio_button_spec.rb      |  4 +--
 spec/models/dialog_field_text_box_spec.rb          |  4 +--
 14 files changed, 78 insertions(+), 26 deletions(-)

Comment 5 Shveta 2016-07-06 18:45:55 UTC
Verification blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1353318 on 5.5

Comment 6 Shveta 2016-07-15 18:36:40 UTC
Use this method : 
========================
#
# Description: <Method description here>
#

$evm.log(:info, "******************** SOFTWARE_SELECTION METHOD  ********************")
$evm.log(:info, "**** Instance: #{$evm.current_object} ****")

dialog = $evm.object

operating_systems_array = $evm.object['operating_systems_array']

operating_system = $evm.root['dialog_option_1_os']

$evm.log(:info, "operating_systems_array = #{operating_systems_array.inspect}  Class: #{operating_systems_array.class}")
#$evm.log(:info, "Operating System = <#{operating_system}>")

if operating_system.nil?
  $evm.log(:info, "Setting field to read-only")
  dialog['read_only'] = true
else
  os_name = operating_system.first.name
  
  $evm.log(:info, "Operating System Name <#{os_name}>")
    
  if operating_systems_array.include?(os_name)
    $evm.log(:info, "Setting field to read/write.")
    dialog['value'] = "t"
    dialog['read_only'] = false
  end
end



Create a dialog with checkbox (dynamic) .
Create a service with this dialog.

Checkbox flip flops correctly based on values provided in method .

Build : 5.5.5.2.20160712144556_629f93b

Comment 8 errata-xmlrpc 2016-07-26 15:34:22 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://rhn.redhat.com/errata/RHBA-2016-1488.html


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