Closed kTipSSIoYv closed 2 years ago
This is intentional as part of https://github.com/ManageIQ/manageiq-automation_engine/issues/480 / https://github.com/ManageIQ/manageiq-automation_engine/pull/484. Previously, arrays were were stored comma separated, but that prevented actual commas in the data field. It's possible this might just need some UI changes to present it as multiple values. @jeffibm who can look at this one?
@kTipSSIoYv Is this only a presentation problem, or is this an actual problem where the data gets sent to AWX? It's hard to tell what the issue is here aside from presentation.
@Fryguy I'm unable to retrieve the data by index 0 or 1. When I try to retrieve index 0
I get both values with a special character in between.
job_template_array = prov.get_option_array(:job_template_id)
job_template_array = job_template_array[0]
[----] I, [2022-07-06T09:05:14.492607 ManageIQ/manageiq#314:2aad21d5b6fc] INFO -- automation: Q-task_id([r745_miq_provision_1962]) <AEMethod launch_ansible_job> job_template_by_id is 118▼119
@Fryguy Is there any workaround I can try? I'm kind of stuck due to this issue.
Looks like there's a bug with get_option_array not splitting the new character - @akhilkr128 can you take a look at this one?
Hey @kTipSSIoYv , I am not able to identify the page from which this issue is reported. Could you please post a full page screenshot with breadcrumbs?
Create a service dialog. Choose any multiselect and it'll display the value in a weird format in the request section.
Create a method to retrieve the dialog first value.
You'll see that the output retrieves both value with a special character in between.
[----] I, [2022-07-06T09:05:14.492607 ManageIQ/manageiq#314:2aad21d5b6fc] INFO -- automation: Q-task_id([r745_miq_provision_1962]) <AEMethod launch_ansible_job> job_template_by_id is 118▼119
Looking into the issue.
@jeffibm This is a custom dialog with a multiselect.
Is there any workaround I can try? I'm kind of stuck due to this issue.
@kTipSSIoYv Yes, in your automate code you can do:
- job_template_array = prov.get_option_array(:job_template_id)
+ job_template_array = prov.get_option_array(:job_template_id).split("\x1F")
job_template_array = job_template_array[0]
I have created the service dialogue on Morphy branch with multi-select dropdowns and added a dynamic dropdown also which is working fine. Can you tell me more information about populating this data on dropdown? So that I can reproduce this.
It seems like its working only for you.
I just created a new docker image using latest morphy and I still see the same issue.
@kTipSSIoYv How you are creating this request using order button or by API?
Got the issue in the safari browser, I was checking in chrome and firefox.
In Morphy release, multiselect array is storing data as ["118\u001F119"] instead of ["118", "119"]. I'm unable to retrieve data by index.
Any workaround to fix this?