Bug 1283734 - Empty Text Box in service dialog causes error
Summary: Empty Text Box in service dialog causes error
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.6.0
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: ui:service:catalog
: 1283732 (view as bug list)
Depends On:
Blocks: 1290094
TreeView+ depends on / blocked
 
Reported: 2015-11-19 16:59 UTC by Pete Savage
Modified: 2016-06-13 19:17 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1290094 (view as bug list)
Environment:
Last Closed: 2016-06-13 19:17:03 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pete Savage 2015-11-19 16:59:49 UTC
Description of problem: Empty Text Box in service dialog causes error


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


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 13:14:41 UTC
*** Bug 1283732 has been marked as a duplicate of this bug. ***

Comment 3 Greg McCullough 2015-11-25 19:17:46 UTC
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 16:34:36 UTC
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 18:58:11 UTC
OK, one difference I see is that I provisioned an OpenStack and used the CatalogItemInitialization entryPoint.

Comment 6 Shveta 2016-04-12 22:08:15 UTC
Not able to reproduce this issue in 5.5.3.4.20160407153134_b3e2a83

Comment 7 eclarizi 2016-06-13 17:01:04 UTC
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 19:17:03 UTC
Gotcha, thanks!


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