Project

General

Profile

Patch #42144 ยป optimize-issues-controller-show.patch

Go MAEDA, 2025-01-22 23:30

View differences:

app/controllers/issues_controller.rb
112 112
    respond_to do |format|
113 113
      format.html do
114 114
        @priorities = IssuePriority.active
115
        @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
116
        @time_entries = @issue.time_entries.visible.preload(:activity, :user)
115
        if @project.module_enabled?(:time_tracking)
116
          @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
117
          @time_entries = @issue.time_entries.visible.preload(:activity, :user)
118
        else
119
          @time_entry = nil
120
          @time_entries = []
121
        end
117 122
        @relation = IssueRelation.new
118 123
        @has_changesets = @issue.changesets.visible.preload(:repository, :user).exists?
119 124
        retrieve_previous_and_next_issue_ids
    (1-1/1)