-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add flag for init of defaults in fields #18061
Conversation
@eclarizio can you 👀 please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option is going to need to be propagated through this, I think. https://github.com/ManageIQ/manageiq/blob/master/app/models/service_template.rb#L426
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look fine, the specs should be easy to add for resource_action_workflow
since we already have a section where the different options are being enabled. service_template
spec might be a bit more involved to add a spec, but I'm sure you can do it 👍
148893f
to
73e830d
Compare
@miq-bot remove_label wip |
Hey @eclarizio can you please review again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this side is good to go. The API side can be merged after this to take advantage of the new logic
👍
@miq-bot add_reviewer @tinaafitz |
@miq-bot add_label blocker |
@d-m-u if this will be able to be backported, please add the gaprindashvili/yes and hammer/yes labels |
@miq-bot add_label bug |
@miq-bot add_label gaprindashvili/yes, hammer/yes |
This comment has been minimized.
This comment has been minimized.
@miq-bot assign @gmcculloug |
@bdunne can you please 👀 for me? |
app/models/service_template.rb
Outdated
@@ -427,7 +427,8 @@ def provision_workflow(user, dialog_options = nil, request_options = {}) | |||
:target => self, | |||
:initiator => request_options[:initiator], | |||
:submit_workflow => request_options[:submit_workflow], | |||
:provision_workflow => request_options[:provision_workflow] | |||
:provision_workflow => request_options[:provision_workflow], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ra_options = request_options.slice(:initiator, :init_defaults, ...).merge(:target => self)
?
@d-m-u is this ready for merge, if yes, @gmcculloug can you merge. |
This, and the related ManageIQ/manageiq-api#485 should be both good to go |
config/settings.yml
Outdated
@@ -980,6 +980,7 @@ | |||
:name: | |||
:maindb: ExtManagementSystem | |||
:container_deployment_wizard: false | |||
:run_automate_methods_on_service_catalog_api_submit: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I would suggest is dropping the catalog
from the name. Technically it is a service_template
but I think run_automate_methods_on_service_api_submit
is enough.
Checked commit d-m-u@4c4601d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Add flag for init of defaults in fields (cherry picked from commit 2ab08ae) https://bugzilla.redhat.com/show_bug.cgi?id=1635673
Hammer backport details:
|
@d-m-u |
Backported to Gaprindashvili via #18099 |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1635673
At this point if a service dialog gets ordered via the API, it will not honor defaults on static fields. To remedy this, this adds a flag to the call to also let us call
load_values_into_fields(values, false)
, thus honoring the default values. This builds on the recent changes to #17844Related:
ManageIQ/manageiq-api#485