diff --git a/app/models/impediment.rb b/app/models/impediment.rb index c857a83770..ee07f2efb7 100644 --- a/app/models/impediment.rb +++ b/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 \ No newline at end of file