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

Enable 'Paste' button if the coppied data are in the session #4513

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

romanblanco
Copy link
Member

@romanblanco romanblanco commented Aug 21, 2018

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1426390
Closes: #4189

I didn't much understood the original condition used to decide button's state, but I didn't yet found another button, which functionality I could break by the change.

The @resolve[:uri] is only possibly getting filled, if the params[:button] is "throw" or "retry":
https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/automate.rb#L155

The condition now tests for the data presence in the session (data are assigned to the session in https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/automate.rb#L40-L44)

Links

Steps for Testing/QA

  1. Automate - Simulation
  2. fill the form and submit - the Copy button will get enabled
  3. Automate - Customization - Buttons accordion - Add a new Button
  4. paste button should be enabled and work

@miq-bot
Copy link
Member

miq-bot commented Aug 21, 2018

Checked commit romanblanco@4dfc0ac with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@mzazrivec mzazrivec self-assigned this Aug 22, 2018
@mzazrivec mzazrivec added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 22, 2018
@mzazrivec mzazrivec merged commit 1d36f17 into ManageIQ:master Aug 22, 2018
@romanblanco romanblanco deleted the bz1426390 branch August 22, 2018 08:42
@@ -1,6 +1,6 @@
#ab_form
#policy_bar
- if @resolve[:uri] && Hash[*@resolve[:target_classes].flatten].invert[@resolve[:new][:target_class]] == @edit[:new][:target_class]
- if session[:resolve_object].present?
Copy link
Contributor

Choose a reason for hiding this comment

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

@romanblanco this button should only be available when same target class is selected in the tree as in the options that were copied over, you are missing the condition from the check that was removed in this PR Hash[*@resolve[:target_classes].flatten].invert[@resolve[:new][:target_class]] == @edit[:new][:target_class]

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.

Automate Simulation copy to Button doesn't work
4 participants