Bug 1431688 - service dialog can be submitted before entry point code on dynamic fields has completed execution
Summary: service dialog can be submitted before entry point code on dynamic fields has...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: cfme-future
Assignee: eclarizi
QA Contact: Shveta
URL:
Whiteboard: service
Depends On:
Blocks: 1439313 1439314
TreeView+ depends on / blocked
 
Reported: 2017-03-13 15:45 UTC by Saif Ali
Modified: 2020-09-10 10:19 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1439313 1439314 (view as bug list)
Environment:
Last Closed: 2018-08-07 14:31:53 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
add to shopping cart enabled while refresh is working (56.00 KB, image/png)
2017-10-31 19:36 UTC, Shveta
no flags Details

Description Saif Ali 2017-03-13 15:45:52 UTC
Description of problem:
We have a field on a service dialog that is marked dynamic that has entry point code that generates the name for an Azure resource based on another field on the service dialog. Occasionally the entry point code has not completed running before the user submits the service dialog. This results in a resource group being created in Azure with only part of the name it should have. The service dialog and the automation model classes and instances are attached.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 eclarizi 2017-03-28 05:19:00 UTC
Can you confirm that this is in the OPs UI? Also, can you give me the exact set of steps you're using?

I imported the given dialog and couldn't see anything that would've indicated the behavior you're seeing. I don't have all of the automate methods that are used by this dialog, but I tried an automate method with a "sleep 10" in it so that I could visibly see a fake "delay". The only thing I could think of is maybe someone typed in one of the fields that was triggering the auto-refresh and then before tabbing out of it or clicking off (which trigger the refresh), they clicked 'submit', but I tried this as well and it correctly makes the dynamic field update calls first, and then attempts to submit the dialog.

Is there a specific catalog item setup that maybe I'm missing?

Comment 8 CFME Bot 2017-03-31 17:57:41 UTC
New commit detected on ManageIQ/manageiq-ui-service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/7abbefddabbe70335edc73e25d4d830dfe4cc32f

commit 7abbefddabbe70335edc73e25d4d830dfe4cc32f
Author:     Erik Clarizio <eclarizi>
AuthorDate: Fri Mar 31 08:29:15 2017 -0700
Commit:     Erik Clarizio <eclarizi>
CommitDate: Fri Mar 31 08:34:43 2017 -0700

    Disable add to cart button when dynamic fields are processing
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1431688

 client/app/states/catalogs/details/details.html    |  2 +-
 .../app/states/catalogs/details/details.state.js   | 13 +++++
 .../states/catalogs/details/details.state.spec.js  | 68 +++++++++++++++++++++-
 3 files changed, 79 insertions(+), 4 deletions(-)

Comment 9 eclarizi 2017-03-31 18:29:39 UTC
From a previous discussion, we determined this was an SUI issue. The fix I've implemented just makes it so that the "add to cart" button is disabled while the dynamic fields are still updating.

Comment 13 Shveta 2017-10-31 19:36:16 UTC
Created attachment 1346087 [details]
add to shopping cart enabled while refresh is working

We shouldn't be able to add the catalog item to the shopping cart while it's being refreshed.

Not working in  5.9.0.4.20171024163837_ef71ea6 

Add to shopping cart is enabled while refresh is working .
Screenshot attached.

Comment 14 eclarizi 2017-11-14 08:03:16 UTC
Yeah the code got changed to use the new targeted auto refresh system and the new dialog-user ui-component and the part that was ensuring the "add to shopping cart" button gets disabled got lost in there somehow.

Comment 15 Tina Fitzgerald 2018-05-24 21:44:24 UTC
We think issue has been fixed with latest PRs. Waiting for QE to validate.

Comment 16 Shveta 2018-05-30 00:24:07 UTC
Works in master.20180525014609_98ef65d

Comment 17 Tina Fitzgerald 2018-07-09 20:16:23 UTC
Hi Shveta,

Can you test this on the latest 5.9.2.4?

Thanks,
Tina

Comment 18 Shveta 2018-07-10 16:39:50 UTC
"Add to shopping cart" button is disabled while refresh is working .
Verified in 5.10.0.3.20180705151325_ce4d2b5

Comment 19 Shveta 2018-07-10 16:42:27 UTC
Verified in 5.9.3.4.20180702181921_afd03d7


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