Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure 'submit_workflow' is true when adding a service to a cart #426

Merged
merged 1 commit into from
Jul 18, 2018

Conversation

eclarizio
Copy link
Member

This is related to #406 which was meant to remove the automate calls from submit, but the SUI does not directly order the service, it instead adds the service to a cart before ordering. This caused an issue where the dialog field properties weren't being propagated correctly and so the validation was failing.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1601925

@miq-bot add_label gaprindashvili/yes, bug, blocker
@miq-bot assign @gtanzillo

@d-m-u Can you review?
@gtanzillo Please re-assign if you think someone else should be assigned.

/cc @tinaafitz

@@ -90,7 +90,7 @@ def service_request_workflow(service_request)
raise BadRequestError, "Must specify a service_template_href for adding a service_request"
end
service_template = resource_search(service_template_id, :service_templates, ServiceTemplate)
service_template.provision_workflow(User.current_user, service_request)
service_template.provision_workflow(User.current_user, service_request, {:submit_workflow => true})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but you can remove the curly braces around {:submit_workflow => true}

@miq-bot
Copy link
Member

miq-bot commented Jul 18, 2018

Some comments on commit eclarizio@a8049ae

spec/requests/service_orders_spec.rb

  • ⚠️ - 93 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@eclarizio
Copy link
Member Author

@gtanzillo Changes made. As a side note, I really didn't want to use expect_any_instance_of, but the tests failed when I tried to place an expect directly on service_template and I couldn't figure out why, since it was selecting the right object.

@miq-bot
Copy link
Member

miq-bot commented Jul 18, 2018

Checked commit eclarizio@a8049ae with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 1 offense detected

spec/requests/service_orders_spec.rb

@gtanzillo gtanzillo added this to the Sprint 91 Ending Jul 30, 2018 milestone Jul 18, 2018
@gtanzillo gtanzillo merged commit 9d146dc into ManageIQ:master Jul 18, 2018
simaishi pushed a commit that referenced this pull request Jul 25, 2018
Ensure 'submit_workflow' is true when adding a service to a cart
(cherry picked from commit 9d146dc)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1603029
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit da692252225a73174b01883a84635be015a5cb35
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Wed Jul 18 16:12:49 2018 -0400

    Merge pull request #426 from eclarizio/BZ1601925
    
    Ensure 'submit_workflow' is true when adding a service to a cart
    (cherry picked from commit 9d146dc4207a3482a60e74e01d227ca46236bf18)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1603029

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

Successfully merging this pull request may close these issues.

5 participants