diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index b97d47b5d..4a3a79987 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -182,7 +182,7 @@ class TimeEntry < ApplicationRecord if spent_on && spent_on_changed? && user errors.add :base, I18n.t(:error_spent_on_future_date) if !Setting.timelog_accept_future_dates? && (spent_on > user.today) end - if !Setting.timelog_accept_closed_issues? && issue&.closed? && issue&.was_closed? + if !Setting.timelog_accept_closed_issues? && issue&.closed? && issue.was_closed? errors.add :base, I18n.t(:error_spent_on_closed_issue) end end