diff --git a/app/controllers/report_controller/reports/editor.rb b/app/controllers/report_controller/reports/editor.rb index c07b4273daa7..aedcfd6fc516 100644 --- a/app/controllers/report_controller/reports/editor.rb +++ b/app/controllers/report_controller/reports/editor.rb @@ -412,7 +412,7 @@ def gfv_key_style(key, value) f = @edit[:new][:field_order][f_idx] # Get the field element field_sub_type = MiqExpression.get_col_info(f.last)[:format_sub_type] field_data_type = MiqExpression.get_col_info(f.last)[:data_type] - field_name = f.last.include?(".") ? f.last.split(".").last.tr("-", ".") : f.last.split("-").last + field_name = MiqExpression::Field.get_col_name(f.last) case parm when "style" # New CSS class chosen if value.blank? diff --git a/app/views/report/_form_styling.html.haml b/app/views/report/_form_styling.html.haml index 3a4bff7167a9..f81ab26ff853 100644 --- a/app/views/report/_form_styling.html.haml +++ b/app/views/report/_form_styling.html.haml @@ -18,7 +18,7 @@ %tbody - @edit[:new][:field_order].each_with_index do |f, f_idx| - field_type = MiqExpression.get_col_info(f.last.split("__").first)[:format_sub_type] - - col_name = f.last.include?(".") ? f.last.split(".").last.gsub("-", ".") : f.last.split("-").last + - col_name = MiqExpression::Field.get_col_name(f.last) - styles = @edit.fetch_path(:new, :col_options, col_name, :style) || [] %tr %td