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

Add custom_button and custom_button_set copy to service_template copy #18494

Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Feb 27, 2019

As part of copying service templates (#18450) we should copy custom buts and custom_but_sets on those templates so that's what this does.

The template copy itself got merged yesterday.

Probs best viewed by commit cause the second commit is performance enhancement on tests from the original merge (calling find_by only once per test)

@d-m-u
Copy link
Contributor Author

d-m-u commented Feb 27, 2019

@miq-bot add_label enhancement
@miq-bot add_reviewer @bdunne
@miq-bot assign @gmcculloug
@miq-bot add_label hammer/no

@miq-bot miq-bot requested a review from bdunne February 27, 2019 14:14
@d-m-u d-m-u force-pushed the custom_button_copy_for_service_templates branch 2 times, most recently from ce894ab to d8395db Compare February 27, 2019 14:30
@d-m-u d-m-u force-pushed the custom_button_copy_for_service_templates branch from d8395db to 8f0d26a Compare February 27, 2019 15:04
@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2019

Checked commits d-m-u/manageiq@303322f~...8f0d26a with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@d-m-u
Copy link
Contributor Author

d-m-u commented Feb 27, 2019

@miq-bot add_reviewer @tinaafitz

Copy link
Member

@bdunne bdunne left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@gmcculloug gmcculloug merged commit 2200b66 into ManageIQ:master Feb 27, 2019
@gmcculloug gmcculloug added this to the Sprint 106 Ending Mar 4, 2019 milestone Feb 27, 2019
template.add_resource(resource, sr)
end
service_resources.each { |service_resource| resource_copy(service_resource, template) }
custom_buttons.each { |custom_button| custom_button_copy(custom_button, template) }
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is the bug ... custom_buttons are not custom buttons assigned to this service template.

If you want that, you need to use direct_custom_buttons.
custom_buttons gives you those, and every single custom button for any ServiceTemplate .. and you don't want to copy those.

(that should fix #18954)

@d-m-u d-m-u deleted the custom_button_copy_for_service_templates branch September 26, 2019 10:34
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.

6 participants