-
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
Update the button order on copy #19227
Update the button order on copy #19227
Conversation
@miq-bot add_label bug, ivanchuk/yes |
8ea6074
to
eea42b8
Compare
@@ -5,7 +5,7 @@ def template_copy(new_name = "Copy of " + name + Time.zone.now.to_s) | |||
if template_valid? && type != 'ServiceTemplateAnsiblePlaybook' | |||
ActiveRecord::Base.transaction do | |||
dup.tap do |template| | |||
template.update_attributes(:name => new_name, :display => false) | |||
template.update!(:name => new_name, :display => false, :options => {:button_order => []}) |
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.
@d-m-u How does the button_order get updated to cb-#{id}? Is there a rails callback that's updating it?
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.
that's what the rest of the changes, 30 and 35, in this file are doing
1b53d33
to
0899c32
Compare
@dmetzger57 this should be the last remaining thing needed for the ticket |
@tinaafitz @bdunne anyone want to review please? |
0899c32
to
fdcd9c2
Compare
@d-m-u let me know when you have an update to test this in UI, currently when copying a Catalog Item it only copies custom buttons directly under an item and ignore custom button groups. |
faa7a7a
to
9ce4609
Compare
verified in UI. Issue is fixed. |
9ce4609
to
9a2756b
Compare
9a2756b
to
8ad6599
Compare
Checked commit d-m-u@8ad6599 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
could I please get eyes on this? it's needed for today's build... |
@miq-bot assign @gmcculloug |
@lfu @ZitaNemeckova |
@tinaafitz could you please help me get this moving? |
@gmcculloug could I please get you to merge? |
…rder Update the button order on copy (cherry picked from commit 0780eec) https://bugzilla.redhat.com/show_bug.cgi?id=1740556
Ivanchuk backport details:
|
The service template copy should update the button order that stored in the options hash.
@h-kataria please review
Fixes the last remaining issue with https://bugzilla.redhat.com/show_bug.cgi?id=1740556