diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2de0c5b7abe..6c4da1f8ca1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1046,6 +1046,7 @@ def get_reports_menu(group = current_group, tree_type = "reports", mode = "menu" end else if @temp_title1 != title[1] + reports.sort! reports = [] @temp_title1 = title[1] end diff --git a/app/presenters/tree_builder_report_reports.rb b/app/presenters/tree_builder_report_reports.rb index 2d7f737f521..2cc85737fde 100644 --- a/app/presenters/tree_builder_report_reports.rb +++ b/app/presenters/tree_builder_report_reports.rb @@ -51,7 +51,7 @@ def x_get_tree_custom_kids(object, count_only, _options) node_id = nodes.last.to_i child_names = @rpt_menu[parent_id][1][node_id][1] - count_only ? child_names.size : MiqReport.where(:name => child_names) + count_only ? child_names.size : MiqReport.where(:name => child_names).order(:name) end def folder_hash(id, text, blue)