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

Use custom buttons ids from relation instead of from CustomButtonSet#set_data[:button_order] #15873

Conversation

lpichler
Copy link
Contributor

we cannot rely on CustomButtonSet#set_date[:button_order] as well
as on CustomButtonSet#custom_buttons

also, it was a problem for UI specs, but it was solved in this commit ManageIQ/manageiq-ui-classic@3f46a60
(it was about keeping CustomButtonSet#set_date[:button_order] same as CustomButtonSet#custom_buttons )

@miq-bot add_label technical_debt
@MIT-bot assign @gtanzillo

cc @martinpovolny

Links

method added here
#15725

@miq-bot
Copy link
Member

miq-bot commented Aug 22, 2017

@lpichler Cannot apply the following label because they are not recognized: technical_debt

filtered_ids = custom_button_from_set.select { |x| x.evaluate_visibility_expression_for(object) }.pluck(:id)
if filtered_ids.present?
custom_button_set.set_data[:button_order] ||= {}
Copy link
Member

Choose a reason for hiding this comment

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

Why this line of code if this will be overwritten by the next line of code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it is not needed, thanks, fixed

…set_date[:button_order]

we cannot rely on CustomButtonSet#set_date[:button_order] as well
as on CustomButtonSet#custom_buttons
@lpichler lpichler force-pushed the use_custom_buttons_ids_instead_of_set_data#button_order branch from 82d3f96 to d4f8dda Compare August 23, 2017 13:11
@miq-bot
Copy link
Member

miq-bot commented Aug 23, 2017

Checked commits lpichler/manageiq@70ca73f~...d4f8dda with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@martinpovolny martinpovolny merged commit 12e27eb into ManageIQ:master Aug 25, 2017
@martinpovolny martinpovolny self-assigned this Aug 25, 2017
@martinpovolny martinpovolny added this to the Sprint 68 Ending Sep 4, 2017 milestone Aug 25, 2017
@lpichler lpichler deleted the use_custom_buttons_ids_instead_of_set_data#button_order branch August 25, 2017 12:37
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.

None yet

4 participants