deecay / redmine_pivot_table

This Redmine plugin allows you to generate pivot table for issue analysis.
MIT License
52 stars 37 forks source link

pivot_table incompatible with issue_category_tree? #13

Open DarkSideGeek opened 8 years ago

DarkSideGeek commented 8 years ago

Click on Pivot link generates 500 error. Log shows a possible conflict with the issue_category_tree plugin? https://github.com/bpat1434/redmine_category_tree

ActionView::Template::Error (undefined method `render_issue_category_with_tree' for #<#<Class:0x007f5b25325960>:0x007f5b25326f90>):
    45:
    46: %> { <% @query.available_columns.each_with_index do |column, j| -%><%
    47:
    48:  %>"<%= column.caption -%>":"<% if (text = (column.name == :done_ratio) ? column.value_object(issue).to_s : column_content(column, issue)) -%><%=raw escape_javascript(text.split("\n")[0]) -%><% end -%>"<% if (j < @query.available_columns.size - 1) -%>,<% end -%><% end -%><%
    49:
    50: %> } <% if (i < @issues.size - 1) -%>,<% end -%><% end -%>
    51:
  plugins/redmine_category_tree/lib/redmine_category_tree/patches/queries_helper_patch.rb:21:in `column_content_with_issue_categories'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:48:in `block (2 levels) in _plugins_redmine_pivot_table_app_views_pivottables_index_html_erb__2060417366528778665_70014721509360'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:46:in `each'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:46:in `each_with_index'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:46:in `block in _plugins_redmine_pivot_table_app_views_pivottables_index_html_erb__2060417366528778665_70014721509360'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:44:in `each'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:44:in `each_with_index'
  plugins/redmine_pivot_table/app/views/pivottables/index.html.erb:44:in `_plugins_redmine_pivot_table_app_views_pivottables_index_html_erb__2060417366528778665_70014721509360'
deecay commented 8 years ago

Hi there,

I'm afraid I can't help you much here.

I tried to install and test other plugins that patches column_content(), such as spent-time and user_icon, but both didn't cause conflict.

The conflict might be caused by category-tree using a custom defined function in queries_helper_patch, which other plugins with similar patch don't do. But I can't be sure.

If I really wanted both plugins to coexist, I would try to transplant the contents of the function render_issue_category_with_tree into queries_helper_patch.rb, to eliminate custom function call.