dynamo-media / redmine_issue_detailed_tabs_time

30 stars 23 forks source link

fixed issue with displaying when entry is journal and not visible Fixes #46 #47

Closed GabrielCC closed 10 years ago

GabrielCC commented 10 years ago

On our instance of Redmine, we discovered a strange bug caused by entry visibility. The reported error was: Rendered plugins/redmine_resources/app/views/issues/show.html.erb within layouts/base (326.6ms) Completed 500 Internal Server Error in 471.9ms

ActionView::Template::Error (can't convert nil into String): 23: 24:

25: 26: <%= c = draw_entries_in_issue_history_tab(entries, journals).html_safe > 27: < end > 28: < heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %> app/controllers/issues_controller.rb:128:in block (2 levels) in show' app/controllers/issues_controller.rb:125:inshow'

I've done a little digging and it resulted that in specific conditions, draw_entry_tab was returning a nil (the 2 if where both false) Fixed by adding an empty string as a fallback.

GabrielCC commented 10 years ago

This pull request will fix issue #46.