Bug 1704695

Summary: refresh methods are unable to populate textarea fields with yaml content
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: AutomateAssignee: William Fitzgerald <wfitzger>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: urgent Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: urgent    
Version: 5.10.3CC: dmetzger, duhlmann, eumartin, fdewaley, gekis, gmccullo, mkanoor, mshriver, obarenbo, simaishi, tfitzger, tpapaioa, wfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.11.0.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1710608 (view as bug list) Environment:
Last Closed: 2019-12-13 15:16:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1704905, 1710608    
Attachments:
Description Flags
Requests page showing blank value for refresh field
none
testing dialog
none
test domain none

Description Felix Dewaleyne 2019-04-30 11:13:31 UTC
Description of problem:
refresh methods are unable to populate textarea fields with yaml content

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

How reproducible:
all the time

Steps to Reproduce:
1.create a dialog with a textarea field
2. turn the field into a dynamic field with a refresh method loaded with the dialog and add a refresh button
3. create the method that will populate the field with any YAML formatted data
4. assign the dialog to a button anywhere in Cloudforms
5. use the button

Actual results:
no text is loaded into the textarea, not even when clicking on refresh

Expected results:
the yaml text is displayed

Additional info:
if you replace the yaml with standard text such as "hello world" the dialog performs as expected.

Comment 8 Felix Dewaleyne 2019-05-02 12:33:41 UTC
okay the issue at hand with the customer is that the value that is loaded through automate into a dynamic text area field is not passed when you submit the form.

If you put the value in a non-dynamic text area dialog, the value is saved.

This regards data in the yaml format. 

I'm updating the reproducer with methods that will populate the automation.log with the values.

Comment 9 Felix Dewaleyne 2019-05-03 10:43:00 UTC
I successfully reproduced the customer's issue. here is the new, updated description :

steps :

1 - create a dialog with a textarea dialog
2 - set the dialog to be dynamic and populated by a new method
3 - the method should populate the text area with yaml content and set the dialog's read_only property to true. order doesn't matter.
4 - import object_walker and make it run as part of provision for a service using that dialog
5 - order the catalog and run the automation before submitting the dialog

result:
the textarea dialog item does not show up in object_walker

expected:
the textarea dialog item shows up in object_walker

note : if you comment out the read_only property edition and instead set that property through the dialog editor, the field is visible in object_walker (and subsequently any automate code running in the state machine)

Comment 26 William Fitzgerald 2019-05-07 21:02:14 UTC
Created attachment 1565357 [details]
Requests page showing blank value for refresh field

Comment 28 eumartin 2019-05-14 11:08:16 UTC
Looks like already addressed here:
 
https://bugzilla.redhat.com/show_bug.cgi?id=1696474

Facing the same issue on Prod with one of my customers after upgrade to 5.10.3.3-1.

Comment 29 Felix Dewaleyne 2019-05-14 15:40:05 UTC
(In reply to eumartin from comment #28)
> Looks like already addressed here:
>  
> https://bugzilla.redhat.com/show_bug.cgi?id=1696474
> 
> Facing the same issue on Prod with one of my customers after upgrade to
> 5.10.3.3-1.

that issue was fixed in 5.10.3 according to the 5.10.z bz that was cloned from that one. the bz is also way more vague than this one.

Comment 30 eumartin 2019-05-14 16:00:05 UTC
I can confirm the same behavior on cfme 5.10.3.3-1, as already logged in the support case : https://access.redhat.com/support/cases/#/case/02381917

Comment 31 eumartin 2019-05-14 16:40:50 UTC
Adding BZ created from the support case : https://bugzilla.redhat.com/show_bug.cgi?id=1706600

Comment 32 William Fitzgerald 2019-05-14 18:31:27 UTC
On my appliance: 10.8.99.54  Version  5.10.3.3

Steps to reproduce:

1. Go to 10.8.99.54
2. Order 'Generic' service
3. Click the refresh button and you should see data in the 1st text box field. 
4. Click submit
5. Click refresh until Service finishes. (Services/Requests)
6. Double Click on your request
7. Page down and Under 'Dialog Options' Notice the 'Text Area' field is blank.

Comment 33 William Fitzgerald 2019-05-15 17:45:53 UTC
Works properly on a hammer-5.20190424144425_1d4816f upstream appliance
with this fix manually applied:  https://github.com/ManageIQ/ui-components/pull/384

Appliance 10.8.99.163.

Fields are being populated in the System Request.

Comment 36 Tina Fitzgerald 2019-05-20 18:14:45 UTC
Update ui-components to 1.2.5 
https://github.com/ManageIQ/manageiq-ui-classic/pull/5604 merged.

Comment 38 Niyaz Akhtar Ansari 2019-05-29 08:34:55 UTC
Created attachment 1574639 [details]
testing dialog

Comment 39 Niyaz Akhtar Ansari 2019-05-29 08:35:24 UTC
Created attachment 1574640 [details]
test domain