diff options
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r-- | app/controllers/issues_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 23d3992f1..e1a3d860c 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -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? |