Bug 1379481

Summary: Dynamic refresh ignored on Service Dialog elements if clicking submit without clicking out of refresh trigger element first
Product: Red Hat CloudForms Management Engine Reporter: Jerome Marc <jmarc>
Component: AutomateAssignee: eclarizi
Status: CLOSED DUPLICATE QA Contact: Milan Falešník <mfalesni>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: cpelland, dajohnso, hkataria, jhardy, ltsai, mfalesni, mkanoor, mpovolny, obarenbo, tfitzger
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate:dialog
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1499589 (view as bug list) Environment:
Last Closed: 2017-10-09 13:43:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1499589    
Attachments:
Description Flags
Service Dialog and Service Request field values do not match none

Description Jerome Marc 2016-09-26 23:31:12 UTC
Description of problem:
On a Service Dialog, I have two elements on a tab with triggers to automatically refresh two other elements on a second tab. When I modify the last element on the first tab and click Submit without clicking out of the element, the auto-refresh is not performed (despite having modifying the element).

On clicking Submit, we should validate that the element haven't changed and trigger auto-refresh if this is the case.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a Service Dialog with 2 tabs and an 2 elements on each.
2. Create Automation to duplicate the value of each elements on the corresponding element on the second tab (e.g. tab1-element1's content will populate tab2-element1 content and tab1-element2's content will populate tab2-element2 content). Below is an Automation example for tab2-element1 dynamic element
3. Create a Service Item and associate the dialog
4. Order the Service Item
5. Modify value of Tab1 Element1 and click outside of the field
6. Modify value of Tab1 Element2 and click Submit without clicking outside of the field

Actual results:
Tab2 Element1 will be updated with the value of Tab1 Element1
Tab2 Element2 will not be updated with the value of Tab1 Element2

Expected results:
Tab2 Element2 should be updated with the value of Tab1 Element2

Additional info: Example for Automation:

# Description: populate element2 with value of element1
tab1element1 = $evm.root['dialog_tab1element1']

unless tab1element1.nil? || tab1element1.length.zero?
	tab2element1 = $evm.object
	tab2element1["data_type"] = "string"
	tab2element1["required"] = "true"
	tab2element1["value"] = tab1element1
end

Comment 2 Jerome Marc 2016-09-26 23:54:57 UTC
After further tests, the issue seems to be more general. I have attached an example with one tab and multiple elements. Despite being displayed properly on the screen before clicking Submit, the associated Service request does not contain the value of the field once submitted.

Comment 3 Jerome Marc 2016-09-26 23:56:00 UTC
Created attachment 1204995 [details]
Service Dialog and Service Request field values do not match

Comment 4 Chris Pelland 2017-10-09 13:43:45 UTC

*** This bug has been marked as a duplicate of bug 1499589 ***