Defect #40086
closed500 Internal Server Error: undefined method `is_closed?'
0%
Description
Started GET "/issues/11925"
[3375]: ActionView::Template::Error (undefined method `is_closed?' for nil:NilClass):
[3375]: 1: <%= render :partial => 'action_menu' >
[3375]: 2:
[3375]: 3: <h2 class="inline-flex"><= issue_heading(@issue) ></h2>
[3375]: 4: <= issue_status_type_badge(@issue.status) >
[3375]: 5: < if @issue.is_private? >
[3375]: 6: <span class="badge badge-private private"><= l(:field_is_private) ></span>
[3375]: 7: < end %>
Updated by Go MAEDA about 1 year ago
Does applying the following changes fix the error?
diff --git a/app/helpers/issue_statuses_helper.rb b/app/helpers/issue_statuses_helper.rb
index 006b4ccc1..a06cd846a 100644
--- a/app/helpers/issue_statuses_helper.rb
+++ b/app/helpers/issue_statuses_helper.rb
@@ -19,6 +19,8 @@
module IssueStatusesHelper
def issue_status_type_badge(status)
+ return '' if status.nil?
+
if status.is_closed?
content_tag('span', l(:label_closed_issues), class: 'badge badge-status-closed')
else
Updated by Marius BÄ‚LTEANU almost 1 year ago
Go MAEDA wrote in #note-1:
Does applying the following changes fix the error?
[...]
It should not be a case with status nil using just plain Redmine.
Daniel Drexlmaier, can you post more information about your environment (admin/info
)? I'm interested especially in plugins section.