Skip to content

Commit

Permalink
Merge pull request #2565 from yrudman/sort-reports-alphabetically
Browse files Browse the repository at this point in the history
Sort reports alphabetically
  • Loading branch information
chessbyte authored Oct 31, 2017
2 parents 60269d4 + 8c2cb8b commit e41ecad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/tree_builder_report_reports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e41ecad

Please sign in to comment.