more precise error message for start date scheduling violation

pull/4599/head
Jens Ulferts 8 years ago
parent 96a56c8e8b
commit 2306954a68
  1. 4
      app/models/work_package/validations.rb
  2. 2
      config/locales/en.yml

@ -95,7 +95,9 @@ module WorkPackage::Validations
def validate_start_date_before_soonest_start_date
if start_date && soonest_start && start_date < soonest_start
errors.add :start_date, :invalid
errors.add :start_date,
:violates_relationships,
soonest_start: soonest_start
end
end

@ -409,6 +409,8 @@ en:
cannot_be_in_another_project: "cannot be in another project."
not_a_valid_parent: "is invalid."
does_not_exist: "does not exist."
start_date:
violates_relationships: "can only be set to %{soonest_start} or later so as not to violate the work package's relationships."
status_id:
status_transition_invalid: "is invalid because no valid transition exists from old to new status for the current user's roles."
priority_id:

Loading…
Cancel
Save