Bug 1563735

Summary: dialog dropdown first.description nilClass in 5.9
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: AutomateAssignee: eclarizi
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.0CC: cpelland, dajohnso, kmorey, lavenel, mkanoor, obarenbo, simaishi, sshveta, tfitzger
Target Milestone: GAKeywords: ZStream
Target Release: 5.9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.1.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1548478 Environment:
Last Closed: 2018-04-12 13:14:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1548478    
Bug Blocks:    
Attachments:
Description Flags
dialog new none

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

Also the attached dialog cannot be imported to 5.9.1.2 , 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 5.9.1.2 .
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 5.9.1.2.20180321221247_67fd99d
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 5.9.1.2.20180321221247_67fd99d
> Appliance : https://10.8.197.179
> Catalog item - generic. 
> 
> Also the attached dialog cannot be imported to 5.9.1.2 , 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.