else
@available_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&)
end
- @custom_fields = target_projects.map{|p|p.all_issue_custom_fields.visible}.reduce(:&)
+ @custom_fields = @issue..map{|p|p.all_issue_custom_fields.visible}.reduce(:&)
@assignables = target_projects.map(&:assignable_users).reduce(:&)
@trackers = target_projects.map(&:trackers).reduce(:&)
@versions = target_projects.map {|p| p.shared_versions.open}.reduce(:&)
end
end
+ def test_bulk_edit_should_only_propose_issues_trackers_custom_fields
+ IssueCustomField.delete_all
+ field = IssueCustomField.generate!(:tracker_ids => [1], :is_for_all => true)
+ IssueCustomField.generate!(:tracker_ids => [2], :is_for_all => true)
+ @request.session[:user_id] = 2
+
+ issue_ids = Issue.where(:project_id => 1, :tracker_id => 1).limit(2).ids
+ get :bulk_edit, :ids => issue_ids
+ assert_equal [field], assigns(:custom_fields)
+ end
+
def test_bulk_update
@request.session[:user_id] = 2
# update issues priority