Skip to content

Conversation

@GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Apr 15, 2024

Fixed automation array values for multi select drop downs in Order Service Forms.

When ordering from a Service Catalog for an Ansible Playbook Catalog Item there is a bug with multi-select dropdown values not being correctly sent to the Ansible Playbook.

An example order service form with a multi-select dropdown:
Screenshot 2024-04-22 at 3 38 28 PM

Before:
When viewing the Ansible Playbook output in the Services / My Services Screen for the Service you order will look like this. test1 is the multi-select dropdown value and it outputs "VARIABLE IS NOT DEFINED!". test2 is just a single select dropdown used for reference.
Screenshot 2024-04-22 at 3 38 11 PM

This is due to the field being with "Array::" on its key value causing the Ansible Playbook output to not be able to find that variable. When the "Array::" tag is removed from the key it then displays the Array as a String with \u001f separating the Array items.
Screenshot 2024-04-22 at 3 47 51 PM

After:
By removing the "Array::" tag from the variable key as well as converting the value being sent to the Ansible Playbook from a String to an Array we receive the Array in the Playbook and see it on the Playbook output correctly. This allows us to send Arrays to the Ansible Playbook and view it correctly on the output screen as individual items instead of as a String.
Screenshot 2024-04-22 at 3 30 43 PM

@Fryguy Fryguy added the wip label Apr 17, 2024
@GilbertCherrie
Copy link
Member Author

Need a ui fix for this: ManageIQ/manageiq-ui-classic@3cdd007

@GilbertCherrie GilbertCherrie changed the title [WIP] Fix automation array values Fix automation array values May 21, 2024
@miq-bot miq-bot removed the wip label May 21, 2024
@Fryguy Fryguy self-assigned this May 22, 2024
@GilbertCherrie GilbertCherrie force-pushed the fix_automation_arrays branch from e83b6fe to 5d6b6ef Compare June 5, 2024 20:18
@miq-bot
Copy link
Member

miq-bot commented Jun 28, 2024

Checked commits GilbertCherrie/manageiq-automation_engine@a81de65~...c54ce45 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
3 files checked, 1 offense detected

lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_object.rb

@Fryguy Fryguy merged commit 7707684 into ManageIQ:master Jun 28, 2024
@Fryguy
Copy link
Member

Fryguy commented Jun 28, 2024

Backported to radjabov in commit f74123e.

commit f74123ed477ea5da5ef995ce33a8cc0f1b270bdc
Author: Jason Frey <[email protected]>
Date:   Fri Jun 28 17:12:11 2024 -0400

    Merge pull request #545 from GilbertCherrie/fix_automation_arrays
    
    Fix automation array values
    
    (cherry picked from commit 7707684565508d02dcc2345b4f706c0f885ea620)

@Fryguy
Copy link
Member

Fryguy commented Sep 6, 2024

Reverted backport to radjabov via 626df04

Fryguy added a commit that referenced this pull request Nov 4, 2024
…rays"

This reverts commit 7707684, reversing
changes made to ac85c9f.
@Fryguy
Copy link
Member

Fryguy commented Nov 4, 2024

Reverted via 1ef49fb

commit 1ef49fbba0290ed95d57a71bb5436c4e45a16cc6 (HEAD -> master, upstream/master, upstream/HEAD)
Author: Jason Frey <[email protected]>
Date:   Mon Nov 4 14:49:00 2024 -0500

    Revert "Merge pull request #545 from GilbertCherrie/fix_automation_arrays"

    This reverts commit 7707684565508d02dcc2345b4f706c0f885ea620, reversing
    changes made to ac85c9f1eb74c97b79de3c935fd232c4614bca26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants