diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 2a69d57ff..0b99eb526 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -356,7 +356,7 @@ class IssuesController < ApplicationController when 'nullify' time_entries.update_all(:issue_id => nil) when 'reassign' - reassign_to = @project.issues.find_by_id(params[:reassign_to_id]) + reassign_to = @project && @project.issues.find_by_id(params[:reassign_to_id]) if reassign_to.nil? flash.now[:error] = l(:error_issue_not_found_in_project) return diff --git a/app/views/issues/destroy.html.erb b/app/views/issues/destroy.html.erb index 4a0631e68..83da014cd 100644 --- a/app/views/issues/destroy.html.erb +++ b/app/views/issues/destroy.html.erb @@ -7,8 +7,10 @@
+<% if @project %>
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("#todo_reassign").attr("checked", true);' %>
+<% end %>