Bug 1663049

Summary: Dynamic drop down code is being executed everytime a service request is opened for review and executed again on approval
Product: Red Hat CloudForms Management Engine Reporter: Ahmed El-Rayess <aelrayes>
Component: AutomateAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED CURRENTRELEASE QA Contact: Niyaz Akhtar Ansari <nansari>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.6CC: bmidwood, hkataria, lavenel, mfeifer, mkanoor, mpovolny, obarenbo, simaishi, tfitzger
Target Milestone: GAKeywords: Reopened, TestOnly, ZStream
Target Release: 5.11.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1667947 1667948 (view as bug list) Environment:
Last Closed: 2019-12-13 15:08:31 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1667947, 1667948    
Attachments:
Description Flags
screen capture of issue none

Description Ahmed El-Rayess 2019-01-02 21:31:40 UTC
Created attachment 1518034 [details]
screen capture of issue

Description of problem:
the code used for the dynamic service dialog items is being executed not only while creating the service request, but also executed everytime the service request is being opened for review and executed again while clicking on the approval.

this is giving the illusion that the system is very slow and unresponsive

the code should be executed once only at the time of the service request, if the request is opened for review and approval it should be getting the details from the database not rerunning the code everytime

Version-Release number of selected component (if applicable):
cfme-5.9.6.5-4.el7cf.x86_64
cfme-appliance-5.9.6.5-1.el7cf.x86_64
cfme-gemset-5.9.6.5-3.el7cf.x86_64
cfme-appliance-common-5.9.6.5-1.el7cf.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a service dialog that uses dynamic items
2. submit a new service request for that service
3. open the service request for review
4. approve the service request

Actual results:
the automation code is executed every time the service request is opened for review and executed again at approval

Expected results:
the automation code should only be executed as service request when the dialog is being displayed to the user.
when the request is opened for review and approval the details should be displayed directly from the database and not rerun the automation code again.

Additional info:
a video of the issue is attached

Comment 3 Tina Fitzgerald 2019-01-03 19:10:03 UTC
Erik is currently looking into this issue.

Comment 4 Tina Fitzgerald 2019-01-14 16:39:29 UTC
Master PR has been merged:
https://github.com/ManageIQ/manageiq-ui-classic/pull/5126

Comment 7 Niyaz Akhtar Ansari 2019-05-14 19:13:25 UTC
Verified in Version 5.11.0.3.20190507174347_a77bd90