]> source.dussan.org Git - redmine.git/commitdiff
Don't always load data that is for html response only.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Jan 2017 09:56:04 +0000 (09:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Jan 2017 09:56:04 +0000 (09:56 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16182 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 9dba545ddaecb4914ac6491963aa7b2acb9d8bbc..3311d3e3082fdbb3659a783677781779b5477dc3 100644 (file)
@@ -102,13 +102,12 @@ class IssuesController < ApplicationController
       @changesets.reverse!
     end
 
-    @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
-    @priorities = IssuePriority.active
-    @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
-    @relation = IssueRelation.new
-
     respond_to do |format|
       format.html {
+        @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
+        @priorities = IssuePriority.active
+        @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
+        @relation = IssueRelation.new
         retrieve_previous_and_next_issue_ids
         render :template => 'issues/show'
       }