Skip to content

Commit

Permalink
use the correct column name in reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Jillian Tullo committed Apr 26, 2017
1 parent b6d814f commit 8f1d33f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/report_controller/reports/editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion app/views/report/_form_styling.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f1d33f

Please sign in to comment.