Add both custom reports and custom report menu items to report menu #3190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code is nearly unreadable and honestly, I don't see the bigger picture here and have no idea how this
get_reports_menu
should behave. The fix is an ugly hack and it might break everything in cases which I don't even know if exist at all. Writing tests around something I don't understand is IMHO meaningless and it might cause even more problems.If you go to
Cloud Intel -> Reports (menu) -> Reports (accordion)
, you will see both the custom menus created under theEdit Report Menus (accordion)
for the current user's group and the custom reports created (if any). Originally the manually edited report menus were not displayed, that has been fixed by #3098, that broke custom reports.Because of #3187 there will be a merge conflict for
gaprindashvili
so I will create a separate PR for that.@h-kataria could you please take a look at this? It might need some extra testing on each place where this is being used.
@miq-bot add_label bug, cloud intel/reports, gaprindashvili/yes
@miq-bot assign @h-kataria
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1531600