ManageIQ / manageiq-automation_engine

Automation engine for ManageIQ
Apache License 2.0
11 stars 73 forks source link

Fix MiqProvisionVirtWorkflow.from_ws user argument #524

Closed agrare closed 1 year ago

agrare commented 1 year ago

The user argument to MiqProvisionVirtWorkflow.from_ws must be the second positional argument not the last. This was causing failures when calling user.userid when user was actually the template_fields hash payload.

I used the example from the docs for the args https://www.manageiq.org/docs/reference/latest/scripting_actions/#inline-method-to-create-a-provision-request

miq-bot commented 1 year ago

Checked commit https://github.com/agrare/manageiq-automation_engine/commit/074d95a45e525ae926a1caa2b7b54f3650b3b949 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint 2 files checked, 0 offenses detected Everything looks fine. :cookie:

jrafanie commented 1 year ago

Note, https://github.com/ManageIQ/manageiq-automation_engine/pull/509 went to oparin, so I added it in case we build it again.

Fryguy commented 1 year ago

Backported to petrosian in commit 2ffdc96cd6ea68b4d0cda8a53039b64fdaf6d547.

commit 2ffdc96cd6ea68b4d0cda8a53039b64fdaf6d547
Author: Joe Rafaniello <jrafanie@users.noreply.github.com>
Date:   Mon Mar 6 13:02:36 2023 -0500

    Merge pull request #524 from agrare/fix_create_provision_request_user_argument

    (cherry picked from commit 239602dd8f15ce20950f0828e172374924a497b2)