Description of problem:
I have a Service Dialog with a Text Box on it.
When a Default Value is set, this will override any result returned by the dynamic method (specified by the Entry Point). Shouldn't this be the other way round?
Version-Release number of selected component (if applicable):
5.6.1.2.20160810181333_8ba817b
How reproducible:
Always
Steps to Reproduce:
1. Create a Service Dialog and associate it to a button on a VM
2. On the dialog, create a Text Box and set a default value
3. Click Dynamic and set an Entry Point method (example bellow)
4. From the VM screen, click on the button
Actual results:
The field will be populated with the default value, ignoring your Dynamic method result.
Expected results:
The default value should be overriden by the value returned by the Dynamic method
Additional info:
When removing the default value from the field, the field is populated with the result from the Dynamic method.
Example of a dynamic method (used to return the VM in context to populate the limit field):
vm_name = $evm.root['dialog_vm_name']
if vm_name.nil? || vm_name.length.zero?
unless $evm.root['vm'].nil?
vm_name = $evm.root['vm'].name
end
end
unless vm_name.nil? || vm_name.length.zero?
limit = $evm.object
limit["data_type"] = "string"
limit["required"] = "true"
limit["value"] = vm_name
end
Jerome - Sounds like removing the default_value from the field setup is a valid work-around for this issue.
You can also set the 'default_value' key as part of the automate method, have you tried using that if you need a default?
Actually I don't see an issue here. Default value is located in "Overridable Options" tab. From my perspective any values entered there should override other tabs vaues, isn't it?
Hey Dmitry! I agree with you about this not being a bug. You can either run the values from the automate method, or you can override with a default in the editor settings.
Description of problem: I have a Service Dialog with a Text Box on it. When a Default Value is set, this will override any result returned by the dynamic method (specified by the Entry Point). Shouldn't this be the other way round? Version-Release number of selected component (if applicable): 5.6.1.2.20160810181333_8ba817b How reproducible: Always Steps to Reproduce: 1. Create a Service Dialog and associate it to a button on a VM 2. On the dialog, create a Text Box and set a default value 3. Click Dynamic and set an Entry Point method (example bellow) 4. From the VM screen, click on the button Actual results: The field will be populated with the default value, ignoring your Dynamic method result. Expected results: The default value should be overriden by the value returned by the Dynamic method Additional info: When removing the default value from the field, the field is populated with the result from the Dynamic method. Example of a dynamic method (used to return the VM in context to populate the limit field): vm_name = $evm.root['dialog_vm_name'] if vm_name.nil? || vm_name.length.zero? unless $evm.root['vm'].nil? vm_name = $evm.root['vm'].name end end unless vm_name.nil? || vm_name.length.zero? limit = $evm.object limit["data_type"] = "string" limit["required"] = "true" limit["value"] = vm_name end