Bug 1563735 - dialog dropdown first.description nilClass in 5.9
Summary: dialog dropdown first.description nilClass in 5.9
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.9.2
Assignee: eclarizi
QA Contact: Shveta
Depends On: 1548478
TreeView+ depends on / blocked
Reported: 2018-04-04 14:55 UTC by Satoe Imaishi
Modified: 2021-06-10 15:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1548478
Last Closed: 2018-04-12 13:14:59 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:

Attachments (Terms of Use)
dialog new (25.64 KB, text/x-vhdl)
2018-04-11 20:43 UTC, Shveta
no flags Details

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1566266 0 high CLOSED Not able to import certain dialogs because of tag Id 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1568440 0 urgent CLOSED In dynamic dropdown list, the default value contains ALL the values of the list 2021-09-09 13:44:14 UTC

Internal Links: 1566266 1568440

Comment 2 Shveta 2018-04-11 20:42:48 UTC
Not working in
Appliance :
Catalog item - generic. 

Also the attached dialog cannot be imported to , I made some modifications to tag Id and only then was able to import it.

Comment 3 Shveta 2018-04-11 20:43:28 UTC
Created attachment 1420517 [details]
dialog new

Comment 4 Dave Johnson 2018-04-11 21:11:18 UTC
Shveta, so in general this works but there is a corner case where this imported dialog is breaking?  If so, I think we want to close this one out and open a new BZ?

Comment 5 Shveta 2018-04-11 21:27:22 UTC
Dave , 

There are two issues mentioned in my comment .
One - this issue is not fixed .
Second - The dialog attached here does not import in CFME version .
Other dialogs can be imported . Only this one has an issue with tag id

Comment 7 eclarizi 2018-04-11 22:12:04 UTC
Looks to me like the modifications made to the tag ID is what broke it. I went into the UI and updated the tag classification in the dialog editor to "Location" from "None" (even though it was showing the correct location values), and the stack trace does not have the unknown method `description` for nil anymore.

However, I noticed that on initial load, since a tag control cannot have a default value, .first.description will always fail, because .first is always going to be nil until we allow default values. I'm not sure how this would've even worked in the first place, unless the users weren't actually using tag controls but drop downs instead.

However, if the user uses drop downs instead and tries to use .first.description, it will again fail because .first is already the value that is being sent, since it is not a tag and does not have a description.

At this point it seems to me like the automate method needs to be updated. It could be written to handle the case when the first object is nil (on load) and if they are using a regular drop down handle that differently than using .first.description.

On Shveta's appliance above, I created a very simple "erik_test" dialog and catalog item that you can see reproduces the stack trace on load, but will reliably show the values selected from either the tag control or the drop down.

The issue of the Tag Control not importing cleanly should be opened as a new BZ.

Comment 10 Shveta 2018-04-11 22:46:25 UTC
Working fine with change in dialog .
Verified in
Opening a new BZ for importing dialog with tag

Comment 11 Loic Avenel 2018-04-12 07:25:06 UTC
(In reply to Shveta from comment #2)
> Not working in
> Appliance :
> Catalog item - generic. 
> Also the attached dialog cannot be imported to , I made some
> modifications to tag Id and only then was able to import it.

where the dialog is coming from ?

Comment 13 Shveta 2018-04-12 17:19:16 UTC
The dialog is attached in https://bugzilla.redhat.com/show_bug.cgi?id=1548478
and worked in CF 4.5 as mentioned in the BZ .
However not able to import it to CF 4.6.

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