Bug 1715396 - Values from a dialog element populated from a dynamic method are not always passed to service or button method.
Summary: Values from a dialog element populated from a dynamic method are not always p...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: Tina Fitzgerald
QA Contact: Ganesh Hubale
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1717501
TreeView+ depends on / blocked
 
Reported: 2019-05-30 09:06 UTC by Peter McGowan
Modified: 2019-12-13 15:00 UTC (History)
8 users (show)

Fixed In Version: 5.11.0.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1717501 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:00:40 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dialog export for problem reproduction (2.41 KB, text/plain)
2019-05-30 09:09 UTC, Peter McGowan
no flags Details
Automate domain for problem reproduction (3.18 KB, application/zip)
2019-05-30 09:12 UTC, Peter McGowan
no flags Details

Description Peter McGowan 2019-05-30 09:06:41 UTC
Description of problem:
If a service dialog has two text box elements, one static and one dynamically populated, the value from the dynamic element will not be passed to the service or button method if the static element is manually populated.

If the static element is left blank (default), then both element values are passed through. 

If the dynamically populated element's value is subsequently manually amended then its value is passed through.

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

How reproducible:
Every time


Steps to Reproduce:
1. Import the attached BZ automate domain and dialog exports. The automate domain contains a method to populate the dynamic second element in the dialog.
2. Install object_walker automate domain from https://github.com/pemcg/object_walker
3. Add a custom button to a VM (or any) object. The button should use the newly imported BZ dialog, and should run object_walker when submitted (/System/Process: Request, Message: create, Request: object_walker
4. Click the custom button, and observe the dialog. The element 'Text Box 1' default value is empty, the dynamic element 'Text Box 2' has been dynamically populated. Submit the button, and observe the values passed through to object_walker - note that both element values have been passed:

~/object_walker_reader.rb | grep dialog
     |    $evm.root['dialog_text_box_1'] =    (type: String)
     |    $evm.root['dialog_text_box_2'] = The dynamic method ran at: 2019-05-30 09:42:40 +0100   (type: String)

5. Repeat step 4, but type some text such as "aa" into element 'Text Box 1'. Submit the button, and note that only the value from 'Text Box 1' has been passed through to object_walker:

~/object_walker_reader.rb -t 2019-05-30T09:43:25.558037 | grep dialog
     |    $evm.root['dialog_text_box_1'] = aaa   (type: String)

6. Repeat step 5, but now also amend the text dynamically entered into 'Text Box 2' (for example adding the string "also". Note that both element values are now passed through to object_walker:

~/object_walker_reader.rb | grep dialog
     |    $evm.root['dialog_text_box_1'] = ccdd   (type: String)
     |    $evm.root['dialog_text_box_2'] = The dynamic method also ran at: 2019-05-30 09:50:10 +0100   (type: String)

Actual results:
See above

Expected results:
All element values should be passed through to the underlying service or button method.

Additional info:

Comment 2 Peter McGowan 2019-05-30 09:09:07 UTC
Created attachment 1575159 [details]
dialog export for problem reproduction

Comment 3 Peter McGowan 2019-05-30 09:12:07 UTC
Created attachment 1575161 [details]
Automate domain for problem reproduction

Comment 4 William Fitzgerald 2019-05-31 14:10:05 UTC
This is now working.  

Reproducer: 10.8.99.194

Tested on Version 5.10.5.0.20190521165820_63c86d5

I used InspectMe instead of ObjectWalker

test 1 
[----] I, [2019-05-31T10:01:56.812496 #17064:aae7f4]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_1:
[----] I, [2019-05-31T10:01:56.813165 #17064:aae7f4]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_2: The dynamic method ran at: 2019-05-31 10:01:14 -0400

test 2

[----] I, [2019-05-31T10:04:39.526022 #17064:abb06c]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_1: aa
[----] I, [2019-05-31T10:04:39.526725 #17064:abb06c]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_2: The dynamic method ran at: 2019-05-31 10:04:27 -0400

test 3 

[----] I, [2019-05-31T10:06:57.272647 #17064:d8b698]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_1: aa
[----] I, [2019-05-31T10:06:57.273504 #17064:d8b698]  INFO -- : Q-task_id([resource_action_10000000000013]) <AEMethod inspectme>   Attribute - dialog_text_box_2: The dynamic method also ran at: 2019-05-31 10:06:16 -0400

Billy

Comment 5 Tina Fitzgerald 2019-06-04 17:39:41 UTC
Hi Peter,

We believe the reported dialog issue has been fixed in a later release.
Billy Fitz validated the fix on 5.10.5 https://bugzilla.redhat.com/show_bug.cgi?id=1715396#c4

There is a hotfix for 5.10.4: https://bugzilla.redhat.com/show_bug.cgi?id=1710578#c6

Thanks,
Tina

Comment 7 Ganesh Hubale 2019-06-06 09:24:40 UTC
Fixed!

Verified on version: 5.11.0.6


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