Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse the column/field name correctly in reports #1170

Merged
merged 1 commit into from
Jun 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.parse_field_or_tag(f.last).report_column
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.parse_field_or_tag(f.last).report_column
- styles = @edit.fetch_path(:new, :col_options, col_name, :style) || []
%tr
%td
Expand Down