Bug 1729046
Summary: | Dynamic Dropdown dialog values show "Nothing is selected" on service order page | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Niyaz Akhtar Ansari <nansari> | ||||||||||||
Component: | Automate | Assignee: | Tina Fitzgerald <tfitzger> | ||||||||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Niyaz Akhtar Ansari <nansari> | ||||||||||||
Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||||||||||
Priority: | medium | ||||||||||||||
Version: | 5.10.7 | CC: | ghubale, gmccullo, mhradil, mkanoor, ndhandre, obarenbo, simaishi, smallamp | ||||||||||||
Target Milestone: | GA | Keywords: | Regression, TestOnly, ZStream | ||||||||||||
Target Release: | 5.11.0 | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Whiteboard: | |||||||||||||||
Fixed In Version: | 5.11.0.16 | Doc Type: | If docs needed, set a value | ||||||||||||
Doc Text: | Story Points: | --- | |||||||||||||
Clone Of: | |||||||||||||||
: | 1729594 (view as bug list) | Environment: | |||||||||||||
Last Closed: | 2019-12-13 15:01:24 UTC | Type: | Bug | ||||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||||
Documentation: | --- | CRM: | |||||||||||||
Verified Versions: | Category: | Bug | |||||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||||||||||
Embargoed: | |||||||||||||||
Bug Depends On: | |||||||||||||||
Bug Blocks: | 1729594 | ||||||||||||||
Attachments: |
|
Created attachment 1589362 [details]
datastore
Created attachment 1589363 [details]
dialog
Created attachment 1589469 [details]
Datastore_2_issue
I have found same issue with these dialog and datastore
Created attachment 1589470 [details]
dialog_2_issue
It was working on 5.10.6 build > It was working on 5.10.6 build That would fit, integer key support was fixed in https://github.com/ManageIQ/ui-components/pull/394, that's the most likely cause of the change. Still, we can only support string keys and integer keys if we make sure to check the data types, which is exactly what exposes this issue. (The difference is that that PR focused on multiselects, where the keys types are preserved, as opposed to single value selects, where it's a string). I think we will have to convert default_value to the type mentioned in data_type, which will make these valid from the API: data_type: "integer" default_value: "2" values: [[2, "HrPBH"], [3, "Jerry"], [1, "Meeseeks"]] data_type: "string" default_value: "2" values: [["2", "HrPBH"], ["3", "Jerry"], ["1", "Meeseeks"]] But these would still be invalid: data_type: "integer" default_value: "2" values: [["2", "HrPBH"], ["3", "Jerry"], ["1", "Meeseeks"]] data_type: "string" default_value: "2" values: [[2, "HrPBH"], [3, "Jerry"], [1, "Meeseeks"]] (assuming the above turns out to be the right solution:) https://github.com/ManageIQ/ui-components/pull/402 *** Bug 1729082 has been marked as a duplicate of this bug. *** New commits detected on ManageIQ/ui-components/master: https://github.com/ManageIQ/ui-components/commit/135048cb8b05d5ab43bfc1ef9f196928beefb8d6 commit 135048cb8b05d5ab43bfc1ef9f196928beefb8d6 Author: Martin Hradil <mhradil> AuthorDate: Thu Jul 11 10:08:16 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Thu Jul 11 10:08:16 2019 -0400 DialogUser - convert single-select default_value to the right data_type Introduced in https://github.com/ManageIQ/ui-components/pull/394, we now require default_value's type to match the types of keys in values. But the API never returns a non-string default_value - we have to do the conversion to the right type. For multiselects, the value is JSON-encoded and already preserves types, but for single select, even integer values get passed as strings. => converting in setDefaultValue Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1729046 src/dialog-user/services/dialogData.ts | 13 +- 1 file changed, 9 insertions(+), 4 deletions(-) https://github.com/ManageIQ/ui-components/commit/d496c24d0461d2d10034c2b340c09d680fd81427 commit d496c24d0461d2d10034c2b340c09d680fd81427 Author: Martin Hradil <mhradil> AuthorDate: Fri Jul 12 11:01:12 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Fri Jul 12 11:01:12 2019 -0400 dialogData.convertDropdownValue: converts values in default_value and values to the right data_type so that we have just one place to run the type conversions https://bugzilla.redhat.com/show_bug.cgi?id=1729046 src/dialog-user/services/dialogData.ts | 39 +- 1 file changed, 25 insertions(+), 14 deletions(-) Hi @Nikhil, Niyaz is on PTO. So I checked by importing datastore(datastore_2_issue) and dialog(dialog_2_issue). I can see that default values are visible instead of "Nothing is selected" while ordering service catalog in general OPS UI. Also values are getting updated dynamically with respect parent value of dropdown and I can able to order catalog item by selecting values from dialog. Thanks, Ganesh Thanks Ganesh.. I tested this with Version: 5.10.7.1.20190712211518_68f0bf9 and working awesome for OPS-UI and SSUI. with 5.11.0.15 its working fine for OPS-UI but same issue with SSUI (comment 17) This relates with one of BZ- https://bugzilla.redhat.com/show_bug.cgi?id=1687061 Testing steps: https://github.com/ManageIQ/integration_tests/blob/master/cfme/tests/automate/custom_button/test_service_vm_custom_button.py#L155 Moving back to ON_QA, please retest on a current appliance :). The change landed in master SUI only 3 days ago, via https://github.com/ManageIQ/manageiq-ui-service/pull/1560 So this would indeed not work in 20190712 which is 2 weeks old. Hey Martin, right, Its working fine with Version: 5.11.0.16 |
Created attachment 1589360 [details] Screenshot showing actual result. Description of problem: Version-Release number of selected component (if applicable): Version 5.10.7.0.20190709151852_68f0bf9 How reproducible: 100% Steps to Reproduce: 1. Import service automate domain and service dialog 2. Add dialog in service 3. Click on service order Actual results: Dynamic Dropdown dialog values show "Nothing is selected" Expected results: Additional info: