#3178: impediments with an empty blocks list are invalid

pull/6827/head
Jens Ulferts 14 years ago
parent 3f14b6fd36
commit bdae7ca0f2
  1. 1
      app/models/impediment.rb

@ -124,6 +124,7 @@ class Impediment < Task
end
def validate_blocks_list
errors.add :blocks_ids, :must_block_at_least_one_issue if relations_from.size == 0
errors.add :blocks_ids, :can_only_contain_issues_of_current_sprint if relations_from.any?{|rel| rel.relation_type == IssueRelation::TYPE_BLOCKS && rel.issue_to.fixed_version != self.fixed_version }
end
end
Loading…
Cancel
Save