Bug 1548478 - dialog dropdown first.description nilClass in 5.9
Summary: dialog dropdown first.description nilClass in 5.9
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Tina Fitzgerald
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks: 1563735
TreeView+ depends on / blocked
 
Reported: 2018-02-23 16:12 UTC by Gellert Kis
Modified: 2021-06-10 14:49 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
dialog used for testing (3.45 KB, text/x-vhdl)
2018-08-07 20:08 UTC, Shveta
no flags Details
Automate domain used for testing (950.15 KB, application/zip)
2018-08-07 20:09 UTC, Shveta
no flags Details

Comment 2 eclarizi 2018-02-27 21:01:58 UTC
I believe the root cause of this is the same as what is happening in https://bugzilla.redhat.com/show_bug.cgi?id=1548562 and 
https://bugzilla.redhat.com/show_bug.cgi?id=1548568.

Basically when choosing from the drop-down, that value isn't actually getting propagated through, so .first gives you a nil value.

This is resolved by https://github.com/ManageIQ/ui-components/pull/258, which currently has two supporting PRs out to be backported:
classic ui: https://github.com/ManageIQ/manageiq-ui-classic/pull/3451
service ui: https://github.com/ManageIQ/manageiq-ui-service/pull/1389

Comment 4 eclarizi 2018-03-09 22:16:25 UTC
The above two PRs have been backported and so the latest 5.9.z should contain the fix.

Comment 8 Shveta 2018-07-10 01:02:53 UTC
Not fixed in 5.10.0.2.20180626170006_40dc459
Appliance : 10.8.197.197/
Service : description_bz

Comment 9 eclarizi 2018-07-17 18:09:58 UTC
Looking at this again, I'm not sure how .first.description ever worked? I don't know if there have ever been any instances where we do $evm.root["dialog_name_of_field"].first.description, since $evm.root["dialog_name_of_field"] is supposed to contain the value of the "name_of_field" field. It doesn't make sense for .first.description to even be called on it.

Shveta, appliance appears to be down for me, can you adjust the automate method to not be calling .first.description and see if that fixes the issue?

Comment 10 Tina Fitzgerald 2018-07-17 19:01:32 UTC
Hi Shveta,

Can you use a tag field to test this?

Multi select tag controls should create an array where the .first.description is valid.

Let me know if you have any questions.

Thanks,
Tina

Comment 11 Shveta 2018-08-06 22:14:39 UTC
Hi , 
Please check https://10.8.59.88/.
Service - tagged_item

Shows script error with first.description.
Please check if any setting is missing.
Thanks, 
Shveta

Comment 12 Tina Fitzgerald 2018-08-07 19:03:29 UTC
Hi Shveta,

Per our Gitter conversation, the tag control dialog type is required for tags.
I created a small test Automate method to log the results of the tag control dialog field(included here).

I'm satisfied that this is working as designed.

Please let me know if you have any questions.

Regards,
Tina



Automation.log output:
[----] I, [2018-08-07T14:55:56.373766 #12135:3bb125c] INFO -- : <AEMethod inspectme> First tag: <#<MiqAeMethodService::MiqAeServiceClassification:0x0000000007d4b488>>
[----] I, [2018-08-07T14:55:56.376767 #12135:3bb125c] INFO -- : <AEMethod inspectme> First tag description: <Active Directory Server>



method: tina_tagging_test/System/Request/Inspectme method:

exit MIQ_OK unless $evm.root['vmdb_object_type'] 

$evm.log("info", "Listing Root Object Attributes:")
$evm.root.attributes.sort.each { |k, v| $evm.log(:info, " Attribute - #{k}: #{v}") }

current_obj = $evm.object
#Set department name
current_obj["value"] = $evm.root['dialog_tag_0_gemeente_experiment']
$evm.log(:info, " First tag: <#{current_obj["value"].first}>")
$evm.log(:info, " First tag description: <#{current_obj["value"].first.description}>")

Comment 13 Shveta 2018-08-07 20:08:34 UTC
Created attachment 1474089 [details]
dialog used for testing

Comment 14 Shveta 2018-08-07 20:09:19 UTC
Created attachment 1474090 [details]
Automate domain used for testing

Comment 15 Shveta 2018-08-07 20:09:47 UTC
Verifying based on above comment and testing in 5.9.4.2.20180802030318_f91df08


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