Loriowar / redmine_issues_tree

Provides a tree view of the Redmine issues list
GNU General Public License v3.0
115 stars 72 forks source link

Error in tree view when adding a custom field column #11

Closed poxtihc closed 8 years ago

poxtihc commented 8 years ago

Hi, I have an error when adding a custom field colum in a query. When clicking Tree View, Internal Error appears.

Rendered plugins/redmine_issues_tree/app/views/issues_trees/_link_to_plain_view.html.haml (0.5ms) Rendered queries/_filters.html.erb (20.2ms) Rendered queries/_columns.html.erb (3.0ms) Rendered plugins/redmine_issues_tree/app/views/issues_trees/_tree_node.html.haml (147.0ms) Rendered plugins/redmine_issues_tree/app/views/issues_trees/_tree_list.html.haml (234.1ms) Rendered plugins/redmine_issues_tree/app/views/issues_trees/tree_index.html.haml within layouts/base (264.4ms) Completed 500 Internal Server Error in 372ms

ActionView::Template::Error (undefined method show_value' for #<#<Class:0x00000003b05510>:0x0000000438a118>): 12: = link_to issue.id, controller: 'issues', action: 'show', id: issue 13: - cols = query.inline_columns.map do |column| 14: - unless column.value(issue) == issue.id 15: - content_tag 'td', column_content(column, issue), class: column.css_classes 16: = raw cols.join plugins/extended_fields/lib/extended_queries_helper_patch.rb:20:incolumn_content_with_extended' plugins/redmine_issues_tree/app/views/issues_trees/_tree_node.html.haml:15:in block in _plugins_redmine_issues_tree_app_views_issues_trees__tree_node_html_haml___1541451473461702559_42844520' plugins/redmine_issues_tree/app/views/issues_trees/_tree_node.html.haml:13:inmap' plugins/redmine_issues_tree/app/views/issues_trees/_tree_node.html.haml:13:in `_plugins_redmine_issues_tree_app_views_issues_treestree_node_htmlhaml1541451473461702559_42844520'

If I remove the custom field column, Tree View works.

I'm using Redmine 2.3.0, and plugin branch 2.5.3.

Regards

Loriowar commented 8 years ago

Most probably this error occur due to inconsistent of logic in redefined partials and templates of the Redmine. So, there is no guarantee of working of plugin with old Redmine versions. I check this behaviour on Redmine 2.5 and higher and fix if needed. But I haven't time for support older versions.

Loriowar commented 8 years ago

I checked work of plugin under Redmine 2.5.3 again. There is no crashes with or without custom fields in issues. All functions work right. So, please, update your Redmine for one of supported versions or fork my plugin and make it compatible with old versions of Redmine. I have no plans of migration this plugin for elder versions of Redmine.