mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Merged r15952 and r15953 (#23922).
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16043 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -170,7 +170,7 @@ class TimelogController < ApplicationController
|
||||
end
|
||||
|
||||
def bulk_edit
|
||||
@available_activities = TimeEntryActivity.shared.active
|
||||
@available_activities = @projects.map(&:activities).reduce(:&)
|
||||
@custom_fields = TimeEntry.first.available_custom_fields
|
||||
end
|
||||
|
||||
@@ -236,7 +236,10 @@ private
|
||||
end
|
||||
|
||||
def find_time_entries
|
||||
@time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).to_a
|
||||
@time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).
|
||||
preload(:project => :time_entry_activities).
|
||||
preload(:user).to_a
|
||||
|
||||
raise ActiveRecord::RecordNotFound if @time_entries.empty?
|
||||
raise Unauthorized unless @time_entries.all? {|t| t.editable_by?(User.current)}
|
||||
@projects = @time_entries.collect(&:project).compact.uniq
|
||||
|
||||
Reference in New Issue
Block a user