-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fix wrong flash messages after widget import #2411
Conversation
app/controllers/report_controller.rb
Outdated
add_flash(_("1 widget imported successfully"), :success) | ||
else | ||
add_flash(_("%{number} widgets imported successfully") % {:number => number}, :success) | ||
end |
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 whole if
can be done as:
n_("%{number} widget imported successfully", "%{number} widgets imported successfully", number) % {:number => number}
Checked commits ZitaNemeckova/manageiq-ui-classic@78d375e~...155463d with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
@mzazrivec Fixed. Thanks :) |
The problem here is that this fix will work only as long as queue worker isn't running. If it's running, This seems to be caused by the fact, that the imported file is deleted by the queue worker I'm a bit on the edge what to do about this PR. @himdel @martinpovolny what do you guys think? |
@mzazrivec I think we should treat it as 2 distinct bugs.. What So.. there should be plenty of time :). But apparently, the attribute is ignored because the task gets run immediately - hence I think this is 2 bugs and the second one is a backend bug => ManageIQ/manageiq#16238. |
@mzazrivec ManageIQ/manageiq#16238 for that error you mentioned. |
If you are seeing this happening with |
Fix wrong flash messages after widget import (cherry picked from commit a26b01e) https://bugzilla.redhat.com/show_bug.cgi?id=1504775
Fine backport details:
|
Cloud Intel -> Reports -> Import/Export -> Widgets -> Choose file (yml with exported widgets) -> Upload -> no widget is checked -> Commit
Before:
No widget imported.
After:
Cloud Intel -> Reports -> Import/Export -> Widgets -> Choose file (yml with exported widgets) -> Upload -> check few widgets -> Commit
Before:
After:
https://bugzilla.redhat.com/show_bug.cgi?id=1501119
Bug is present in Fine.
@miq-bot add_label bug, fine/yes