Closed hsychla closed 9 years ago
I'm having the same problem, and it looks like it's due to the hook being overwritten by a plugin with a higher precedence (based on load-order?)
in my case, it was the advanced_roadmap:
Started GET "/issues/171" for 127.0.0.1 at 2015-07-28 02:20:46 +0000
Processing by IssuesController#show as HTML
Parameters: {"id"=>"171"}
Current user: alex (id=1)
Rendered issues/_action_menu.html.erb (14.8ms)
Rendered plugins/advanced_roadmap/app/views/common/_advanced_roadmap_footer.html.erb (0.8ms)
Rendered plugins/advanced_roadmap/app/views/hooks/issues/_show.html.erb (7.9ms)
Rendered plugins/redmine_spent_time_in_issue_description/app/views/issues/_time_spent_report.html.erb (80.1ms)
Rendered plugins/redmine_spent_time_in_issue_description/app/views/issues/show.html.erb within layouts/base (164.7ms)
Completed 500 Internal Server Error in 341ms (ActiveRecord: 77.6ms)
ActionView::Template::Error (undefined method `spent_on_shown?' for #<#<Class:0x0000000984e960>:0x00000008896928>):
16: <tbody>
17: <% @issue.time_entries.last( Setting.plugin_redmine_spent_time_in_issue_description['spent_time_max_display'].to_i ).each do |entry| %>
18: <tr>
19: <%= content_tag(:td, format_date( entry.spent_on ) ) if spent_on_shown? %>
20: <%= content_tag(:td, link_to_user( entry.user )) if user_shown? %>
21: <%= content_tag(:td, report_time_spent(entry) ) if report_time_shown? %>
22: <%= content_tag(:td, entry.comments ) if comment_shown? %>
app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
app/controllers/issues_controller.rb:115:in `show'
Removing your plugin for the time being, but this shouldn't be too difficult to fix.
Maybe in your initialization block try using
ActionDispatch::Reloader.to_prepare do
require 'issue_helper_patch'
require 'setup_issue_show'
end
to require your patches?
nevermind. I just tried that and that does NOT work ...
It's some incompatibility with other plugins. Still haven't been able to pin point the cause but it is with the Issues Helper Patch.
I included the IssuesHelper methods a different way and it now works with the conflicting plugin advanced_roadmap. Can someone checkout the SpentShownFix branch and verify on their end?
@TravisSpangle I tried SpentShownFix branch and it seems to work. Thank you. Can you merge it to master?
Thanks for verifying!
As requested, a new issue with my problem. After installing the plugin, we get a 500 error when opening issues and the following log entry:
Our system is:
Any idea what's missing/wrong?