Bug 1283734 - Empty Text Box in service dialog causes error
Empty Text Box in service dialog causes error
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
Unspecified Unspecified
high Severity high
: GA
: 5.6.0
Assigned To: eclarizi
: 1283732 (view as bug list)
Depends On:
Blocks: 1290094
  Show dependency treegraph
Reported: 2015-11-19 11:59 EST by Pete Savage
Modified: 2016-06-13 15:17 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1290094 (view as bug list)
Last Closed: 2016-06-13 15:17:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Pete Savage 2015-11-19 11:59:49 EST
Description of problem: Empty Text Box in service dialog causes error

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

How reproducible: 100%

Steps to Reproduce:
1. Create a custom dialog for servicing with a single element, (Text Box)
2. Leave everything as default, so it is not required and has a default value of nothing.
3. Run a catalog provision using the dialog

Actual results: The provision fails, complaining it can't convert nil to String

Expected results: nil should be able to be converted to a String since the field is not required and the default can be blank.

Additional info:
[----] I, [2015-11-19T11:48:27.213802 #2938:7ef35d8]  INFO -- : Q-task_id([service_template_provision_task_23]) <AutomationEngine> <AEMethod dialog_parser> dialog_options: {"dialog_test"=>"", "request"=>"clone_to_service"}
[----] I, [2015-11-19T11:48:27.217110 #2938:7ef35d8]  INFO -- : Q-task_id([service_template_provision_task_23]) <AutomationEngine> <AEMethod dialog_parser> Current task has empty dialogs, getting dialog information from parent task
[----] E, [2015-11-19T11:48:27.219171 #2938:7ef35d8] ERROR -- : Q-task_id([service_template_provision_task_23]) <AutomationEngine> <AEMethod dialog_parser> The following error occurred during method evaluation:
[----] E, [2015-11-19T11:48:27.220432 #2938:7ef35d8] ERROR -- : Q-task_id([service_template_provision_task_23]) <AutomationEngine> <AEMethod dialog_parser>   TypeError: no implicit conversion of nil into String
[----] E, [2015-11-19T11:48:27.222479 #2938:7ef35d8] ERROR -- : Q-task_id([service_template_provision_task_23]) <AutomationEngine> <AEMethod dialog_parser>   /opt/rh/rh-ruby22/root/usr/share/gems/gems/psych-2.0.13/lib/psych.rb:370:in `parse'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/psych-2.0.13/lib/psych.rb:370:in `parse_stream'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/psych-2.0.13/lib/psych.rb:318:in `parse'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/psych-2.0.13/lib/psych.rb:245:in `load'
<code: options_hash = YAML.load(bundle_task.get_option(:parsed_dialog_options))>:107:in `parent_task_dialog_information'
Comment 2 Pete Savage 2015-11-20 08:14:41 EST
*** Bug 1283732 has been marked as a duplicate of this bug. ***
Comment 3 Greg McCullough 2015-11-25 14:17:46 EST
Erik - I know we protect other fields to ensure we pass the proper data type (string/integer).  Looks like we need that same check/conversion here.
Comment 4 eclarizi 2015-12-08 11:34:36 EST
I seem to be unable to reproduce this issue.

Here's the steps I followed, let me know where it differs for you so I can track this down:
Automate -> customization drop down.
Service dialogs accordion.
Create new dialog/dialog_tab/dialog_group/dialog_element
Choose Text box type, fill in name/label leave everything else as it is, save.
Services -> catalogs drop down.
Configuration -> add a new catalog item.
Catalog item type generic.
Fill in name/description, check the "show in catalog" box.
Choose a catalog instead of unassigned.
Choose the dialog you made previously, leave all entry points as they are.
Service catalogs accordion.
Order your new service from the list, blank dialog should appear.
Submit, see "Order request was submitted" message.
Comment 5 Pete Savage 2015-12-09 13:58:11 EST
OK, one difference I see is that I provisioned an OpenStack and used the CatalogItemInitialization entryPoint.
Comment 6 Shveta 2016-04-12 18:08:15 EDT
Not able to reproduce this issue in
Comment 7 eclarizi 2016-06-13 13:01:04 EDT
I'm not able to reproduce this issue either on master, and since Shveta says it's not reproducible on 5.5.3, I'm going to move this and the https://bugzilla.redhat.com/show_bug.cgi?id=1290094 clone to POST.
Comment 9 eclarizi 2016-06-13 15:17:03 EDT
Gotcha, thanks!

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