Bug 1601925 - required field blocks validation of a dialog after automation method called
Summary: required field blocks validation of a dialog after automation method called
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.9.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.10.0
Assignee: eclarizi
QA Contact: Niyaz Akhtar Ansari
URL:
Whiteboard:
Depends On:
Blocks: 1603029
TreeView+ depends on / blocked
 
Reported: 2018-07-17 13:15 UTC by Felix Dewaleyne
Modified: 2021-09-09 15:04 UTC (History)
8 users (show)

Fixed In Version: 5.10.0.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1603029 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:18:40 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Felix Dewaleyne 2018-07-17 13:15:58 UTC
Description of problem:
setting a dropdown field to be a required selection blocks the validation of a dialog in self-service dialog

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

How reproducible:
all the time

Steps to Reproduce:
1.create dialog with dropdown list
2.mark the list as required
3.load the dialog through self service

Actual results:
impossible to validate the dialog due to the required item

Expected results:
if a selection is made, there is no need to set the field as required

Additional info:
it may make sense to disable "required" if a default selection is made on an element.

Comment 2 Felix Dewaleyne 2018-07-17 14:07:21 UTC
further tests show that it looks like after an automation method was used the dialog will reset which fields that are required are filled or not.

Comment 4 Felix Dewaleyne 2018-07-17 14:19:50 UTC
new steps : 

1 - create a dialog using a dynamic method to populate dropdown fields
2 - make a field of the dialog required, E.G. a new text field added and one of the dropdown lists
3 - call the dialog over self service
4 - meet the requirement 
5 - cause the dynamic method to be called

results : 
the requirement to click 'add to cart' is cleared but an error regarding a field being required is raised.


expected :

the button should remain unclickable if the requirement is reset or the fact it is filled is taken into account - ideally refreshing the filed should cause its status to be re-evaluated : if there was no selection/no valid data, the requirement is not met, if there is a selection / valid data, then the requirement should be taken into account as cleared.

Comment 5 Tina Fitzgerald 2018-07-17 14:32:09 UTC
Hi Felix,

Does the Service Dialog work properly when the Service is ordered through the Classic UI?

Thanks,
Tina

Comment 8 Felix Dewaleyne 2018-07-17 16:02:59 UTC
(In reply to Tina Fitzgerald from comment #5)
> Hi Felix,
> 
> Does the Service Dialog work properly when the Service is ordered through
> the Classic UI?
> 
> Thanks,
> Tina

I have only focussed on self service ui for now. I didn't get the same behaviour on the classic ui but test dialog 1 is not behaving correctly. it started duplicating a tab which if removed removes all tabs and some fields are not displaying in the classic ui. it didn't behave like this earlier.

that is the dialog I had edited to test out the behaviour.

Comment 9 Felix Dewaleyne 2018-07-17 16:08:16 UTC
the dialog seems to have gotten corrupted actually by some operation performed... the same fields are now missing in self support as well.

anyway the customer also pushed that he can rperoduce that with a static field. I tried to create a simple dialog like that but that was unsuccessful.

Comment 11 Chris Hale 2018-07-17 16:36:02 UTC
I re examined this behavior as requested by the new dialogs that Felix added.  I am still observing that the UI is sending the data of the selected resource to the API and the API seems to reject its validity.   See https://bugzilla.redhat.com/show_bug.cgi?id=1601925#c7 for an API example of what we are talking about.   Reassigning this issue to API team for further investigation.

Comment 14 Tina Fitzgerald 2018-07-18 19:08:48 UTC
Hi Felix,

Can you set the hot fix flag for this issue if the customer is requesting the hot fix? 

Thanks,
Tina

Comment 15 Tina Fitzgerald 2018-07-18 19:08:55 UTC
Hi Felix,

Can you set the hot fix flag for this issue if the customer is requesting the hot fix? 

Thanks,
Tina

Comment 16 CFME Bot 2018-07-18 20:13:19 UTC
New commit detected on ManageIQ/manageiq-api/master:

https://github.com/ManageIQ/manageiq-api/commit/a8049ae2cb6f6b66bad1fa1146a79f24aacc6f8f
commit a8049ae2cb6f6b66bad1fa1146a79f24aacc6f8f
Author:     Erik Clarizio <eclarizio>
AuthorDate: Wed Jul 18 14:40:45 2018 -0400
Commit:     Erik Clarizio <eclarizio>
CommitDate: Wed Jul 18 14:40:45 2018 -0400

    Ensure 'submit_workflow' is true when adding a service to a cart

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1601925

 app/controllers/api/service_orders_controller.rb | 2 +-
 spec/requests/service_orders_spec.rb | 12 +
 2 files changed, 13 insertions(+), 1 deletion(-)

Comment 21 Niyaz Akhtar Ansari 2018-10-31 08:26:06 UTC
Verified in Version 5.10.0.21.20181023151612_4c11b0d


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