bap14 / redmine_category_tree

Module for Redmine to allow categories to be a tree instead of a single-list
18 stars 21 forks source link

Does not work in Redmine 3.3 #21

Closed jlibster closed 7 years ago

jlibster commented 7 years ago

When category added with this plugin projects no longer render. here is the error: Completed 500 Internal Server Error in 893ms (ActiveRecord: 70.0ms)

ActionView::Template::Error (undefined method `issue_category_tree' for #<#<Cla ss:0x000000095f83c8>:0x0000000960e9c0>): 10: 11:

12:   <tbody>
13: <% issue_category_tree(@project.issue_categories) do |category, level| 

%> 14: <% unless category.new_record? %> 15: <tr class="issue_category <%= cycle 'odd', 'even' %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> 16: <%= category.name %> plugins/redmine_category_tree/app/views/projects/settings/_issue_categories.html.erb:13:in _plugins_redmine_category_tree_app_views_projects_settings__issue_categories_html_erb__3788586393012298150_86049960' plugins/redmine_workflow_enhancements/lib/workflow_enhancements/patches/action_view_rendering.rb:53:inrender_with_workflow_enhancements' app/views/common/_tabs.html.erb:17:in block in _app_views_common__tabs_html_erb___1729537769882111606_82665960' app/views/common/_tabs.html.erb:16:ineach' app/views/common/_tabs.html.erb:16:in _app_views_common__tabs_html_erb___1729537769882111606_82665960' plugins/redmine_workflow_enhancements/lib/workflow_enhancements/patches/action_view_rendering.rb:53:inrender_with_workflow_enhancements' app/helpers/application_helper.rb:325:in render_tabs' app/views/projects/settings.html.erb:3:in_app_views_projects_settings_html_erb___3781972152099544705_74015320' lib/redmine/sudo_mode.rb:63:in `sudo_mode'

jlibster commented 7 years ago

Okay adding this line:

<% self.class.send(:include, RedmineCategoryTree::IssueCategoryHelper) -%>

at the top of

redmine_category_tree/app/views/projects/settings/_issue_categories.html.erb

fixes the issue.

Can the maintainer of this project update the code or make a redmine 3.3 branch so we don't have to fix this. It's a great plugin, but need to keep it up to date with latest ruby/Redmine. Thanks!

To make it easier for future redmine users I'm adding my altered file here. _issue_categories.html.erb.zip