@ -318,7 +318,7 @@ module WorkPackages
end
def validate_duration_integer
errors.add :duration, :only_integer if model.duration_before_type_cast != model.duration
errors.add :duration, :not_an_integer if model.duration_before_type_cast != model.duration
def validate_duration_matches_dates
@ -578,6 +578,7 @@ en:
begin_deletion: "Begin of the deletion"
children: "Subelements"
done_ratio: "Progress (%)"
duration: "Duration"
end_insertion: "End of the insertion"
end_deletion: "End of the deletion"
version: "Version"
@ -498,7 +498,7 @@ describe WorkPackages::BaseContract do
work_package.duration = 4.5
it_behaves_like 'contract is invalid', duration: :only_integer
it_behaves_like 'contract is invalid', duration: :not_an_integer
context 'when setting the duration to a negative value' do