20661-show-visible-spent-time.diff

Go MAEDA, 2017-01-19 13:57

Download (1.23 KB)

View differences:

app/controllers/issues_controller.rb (working copy)
101 101
      @changesets.reverse!
102 102
    end
103 103

  
104
    if User.current.allowed_to?(:view_time_entries, @project)
105
      Issue.load_visible_spent_hours([@issue])
106
      Issue.load_visible_total_spent_hours([@issue])
107
    end
108

  
104 109
    respond_to do |format|
105 110
      format.html {
106 111
        @allowed_statuses = @issue.new_statuses_allowed_to(User.current)
app/views/issues/show.html.erb (working copy)
60 60
  unless @issue.disabled_core_fields.include?('estimated_hours')
61 61
    rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
62 62
  end
63
  if User.current.allowed_to_view_all_time_entries?(@project)
63
  if User.current.allowed_to?(:view_time_entries, @project)
64 64
    if @issue.total_spent_hours > 0
65 65
      rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
66 66
    end