Project

General

Profile

Actions

Defect #40086

open

500 Internal Server Error: undefined method `is_closed?'

Added by Daniel Drexlmaier 3 months ago. Updated 3 months ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

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 %>

Actions #1

Updated by Go MAEDA 3 months 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
Actions #2

Updated by Marius BÄ‚LTEANU 3 months 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.

Actions #3

Updated by Go MAEDA 3 months ago

  • Status changed from New to Needs feedback
Actions

Also available in: Atom PDF