Bug 1687061
Summary: | Custom Button on the VM/Instance not able to get $evm.root["vm"] | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Ahmed El-Rayess <aelrayes> | ||||
Component: | UI - Service | Assignee: | Martin Hradil <mhradil> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nikhil Dhandre <ndhandre> | ||||
Severity: | high | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||
Priority: | high | ||||||
Version: | 5.10.1 | CC: | aelrayes, bmidwood, dmetzger, jprause, lavenel, mshriver, nansari, ndhandre, obarenbo, simaishi, smallamp, tfitzger, wfitzger | ||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
Target Release: | 5.11.0 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 5.11.0.3 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1722817 (view as bug list) | Environment: | |||||
Last Closed: | 2019-12-13 15:09:11 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: | 1722817 | ||||||
Attachments: |
|
Description
Ahmed El-Rayess
2019-03-09 07:52:58 UTC
Is this a regression? I first tested the custom from the service UI with version 5.9 which failed, then I upgraded to 5.10 with latest hot fixes and still the same issue. I could see there was a similar bug for the custom button on a service where the user was not able to get the current service. the bug states that it was fixed. Loic, Yes we do test Dynamic Dialog in both UI Classic UI and SUI. also we have test Dynamic Dialog with custom button on Classic UI. This issue is Dynamic Dialog with custom button on SUI. Nikhil added the test for that. Created attachment 1551485 [details]
issue displayed
attached is a video recording of the issue
and this is a sample code that you can use to test
@vm = $evm.root['vm']
dialog_hash = {}
dialog_hash[@vm.id] = @vm.name
$evm.object['default_value'] = dialog_hash.first[0]
$evm.object['values'] = dialog_hash
the video first shows that code then how it is working fine from the Classic UI, then how it is not working on the Service UI with the error from the automation log.
I suspect the SUI is using the wrong API call for the VM. New commit detected on ManageIQ/manageiq-ui-service/master: https://github.com/ManageIQ/manageiq-ui-self_service/commit/41a30d5d3a34c76ecb9d9b19ec7b5351f7fc6158 commit 41a30d5d3a34c76ecb9d9b19ec7b5351f7fc6158 Author: Martin Hradil <mhradil> AuthorDate: Tue Apr 30 11:45:48 2019 -0400 Commit: Martin Hradil <mhradil> CommitDate: Tue Apr 30 11:45:48 2019 -0400 VM custom button dialog - use the VM instead of the parent service Triggering a VM-based custom button on a Service's VM Resource causes the right dialog to appear.. But the inital data assumes the associated resource is the service, not the VM. Subsequent field refresh requests and submit already use the VM, but the initial load was missed in https://github.com/ManageIQ/manageiq-ui-service/pull/1022. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1687061 client/app/states/services/custom_button_details/custom_button_details.state.js | 4 + 1 file changed, 4 insertions(+) |