mirror of
https://github.com/redmine/redmine.git
synced 2025-11-09 14:56:01 +01:00
Don't allow reassigning reported hours to the project if issue is a required field for time logs (#28110).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17199 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -367,7 +367,12 @@ class IssuesController < ApplicationController
|
||||
when 'destroy'
|
||||
# nothing to do
|
||||
when 'nullify'
|
||||
if Setting.timelog_required_fields.include?('issue_id')
|
||||
flash.now[:error] = l(:field_issue) + " " + ::I18n.t('activerecord.errors.messages.blank')
|
||||
return
|
||||
else
|
||||
time_entries.update_all(:issue_id => nil)
|
||||
end
|
||||
when 'reassign'
|
||||
reassign_to = @project && @project.issues.find_by_id(params[:reassign_to_id])
|
||||
if reassign_to.nil?
|
||||
|
||||
Reference in New Issue
Block a user