Bug 1746211 - unexpected error when dialog with dropdownlist with integer data type is edited to multiline (forces dialog deletion)
Summary: unexpected error when dialog with dropdownlist with integer data type is edit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.8
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: GA
: 5.11.6
Assignee: Milan Zázrivec
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-28 00:45 UTC by Reartes Guillermo
Modified: 2022-11-14 05:02 UTC (History)
8 users (show)

Fixed In Version: 5.11.6.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-10 13:39:05 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)
Error when trying to save the dialog (67.28 KB, image/png)
2019-08-28 00:46 UTC, Reartes Guillermo
no flags Details
Error after cancelling previous error and also canceling the dialog edtion (64.00 KB, image/png)
2019-08-28 00:47 UTC, Reartes Guillermo
no flags Details
production.log (869.76 KB, text/plain)
2019-08-28 00:47 UTC, Reartes Guillermo
no flags Details
automation.log (179.21 KB, text/plain)
2019-08-28 00:48 UTC, Reartes Guillermo
no flags Details
evm.log (compressed due to size) (289.80 KB, application/gzip)
2019-08-28 00:48 UTC, Reartes Guillermo
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:2480 0 None None None 2020-06-10 13:39:27 UTC

Description Reartes Guillermo 2019-08-28 00:45:26 UTC
Description of problem:

A simple static dropdownlist dialog element on a service dialog fails when data type is integer and the dialog is edited to multiselect.
An omnious error page appears and after that, the only option is to delete the affected service dialog since CF becomes unable to edit the dialog properly and further error pages will appear.

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

How reproducible:
always

Steps to Reproduce:
1. Automation -> Automate -> Customization
2. On "All Dialogs" -> Button Configuration -> Add new dialog 
3. Dialog name "test5"
4. Add a dropdownlist to the "new section"
5. Edit the dropdownlist
6. Leave the default 1,2,3 options
7. Change value type to INTEGER, set the default to "One"
8. Also set REQUIERED to Yes.
9. Save and then Save the dialog
10. Select dialog test5 and Configuration -> edit this dialog
11. Edit the dropdownlist
12. In Options, change MULTISELECT to Yes
13. Save and then Save the dialog
14. Puff...

Actual results:

On the browser:

URL https://10.10.0.38/api/service_dialogs/1000000000019
Status 500 Internal Server Error

Content-Type application/json; charset=utf-8
Data {"error":{"kind":"internal_server_error","message":"undefined method `collect' for 1:Integer","klass":"NoMethodError"}} 

Click close, then Cancel (abort dialog edition)

Unexpected error encountered 
Error text:
undefined method `collect' for 1:Integer [miq_ae_customization/explorer] 

Now the dialog test5 cannot be edited anymore from CF. 
The only choice is to delete de dialog.

Expected results:
No error

Additional info:
No dynamic dialog elements are required to reproduce this issue.

Comment 2 Reartes Guillermo 2019-08-28 00:46:06 UTC
Created attachment 1608767 [details]
Error when trying to save the dialog

Comment 3 Reartes Guillermo 2019-08-28 00:47:05 UTC
Created attachment 1608768 [details]
Error after cancelling previous error and also canceling the dialog edtion

the dialog cannot be edited anymore.
It can only be deleted.

Comment 4 Reartes Guillermo 2019-08-28 00:47:39 UTC
Created attachment 1608769 [details]
production.log

Comment 5 Reartes Guillermo 2019-08-28 00:48:15 UTC
Created attachment 1608770 [details]
automation.log

Comment 6 Reartes Guillermo 2019-08-28 00:48:48 UTC
Created attachment 1608771 [details]
evm.log (compressed due to size)

Comment 7 Reartes Guillermo 2019-08-28 01:26:04 UTC
Additional Info:

I reproduced this with cfme-5.9.9.3-1 (CF 4.6)

Comment 8 Reartes Guillermo 2019-08-28 01:32:13 UTC
I reproduced this with cfme-5.11.0.18-1 (CF5 Beta)

Comment 15 Milan Zázrivec 2020-04-20 15:22:28 UTC
https://github.com/ManageIQ/ui-components/pull/437

Comment 16 CFME Bot 2020-04-22 17:11:39 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/c9c47999e72faa21ea2cf1b59a78408a8d9f3be8
commit c9c47999e72faa21ea2cf1b59a78408a8d9f3be8
Author:     Martin Hradil <mhradil>
AuthorDate: Tue Jan 14 23:20:29 2020 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Jan 14 23:20:29 2020 +0000

    Dialog Editor - reset default_value when changing dropdown type, values, or between single and multiselect

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

    (cherry picked from commit 30797a2612b55297026c348621f0a8a2ead3ade3)

 src/dialog-editor/components/modal-field-template/modalFieldTemplateComponent.ts | 32 +-
 1 file changed, 30 insertions(+), 2 deletions(-)

Comment 17 CFME Bot 2020-05-07 17:51:35 UTC
New commit detected on ManageIQ/ui-components/ivanchuk:

https://github.com/ManageIQ/ui-components/commit/541f3e4eb5f0bd99fd920b3f4bee22c2deffb184
commit 541f3e4eb5f0bd99fd920b3f4bee22c2deffb184
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Apr 22 16:00:52 2020 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Apr 22 16:00:52 2020 +0000

    Merge pull request #437 from mzazrivec/bug-1746211

    Dialog Editor - reset default_value when changing dropdown type, values, or between single and multiselect

    (cherry picked from commit 2a03d66e50dabb9e9d04185fdb2b7881c1816237)

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

 .travis.yml | 2 +-
 src/dialog-editor/components/field/field.html | 1 -
 src/dialog-editor/components/field/fieldComponent.spec.ts | 24 -
 src/dialog-editor/components/field/fieldComponent.ts | 9 -
 src/dialog-editor/components/modal-field-template/modalFieldTemplateComponent.ts | 37 +-
 5 files changed, 35 insertions(+), 38 deletions(-)

Comment 18 Satoe Imaishi 2020-05-07 17:55:09 UTC
The PR is now backported to ivanchuk branch. Please release a new version of ui-components and bump the version in OpsUI/SUI.

Comment 23 errata-xmlrpc 2020-06-10 13:39:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:2480


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