Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 15:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-26 15:08:51 +0300
commit8e812185ddf4c77ae3b1512b2d04725190e64209 (patch)
tree2707c33c1585955714f8c367b8beea3c72409160 /app/models/iteration.rb
parent2f47b6d8e1cf97b3a0797fe9f249aa1ae38fc5a1 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/iteration.rb')
-rw-r--r--app/models/iteration.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/iteration.rb b/app/models/iteration.rb
index 2bda0725471..ce0ca64876f 100644
--- a/app/models/iteration.rb
+++ b/app/models/iteration.rb
@@ -93,7 +93,7 @@ class Iteration < ApplicationRecord
# ensure dates do not overlap with other Iterations in the same group/project
def dates_do_not_overlap
- return unless resource_parent.iterations.within_timeframe(start_date, due_date).exists?
+ return unless resource_parent.iterations.where.not(id: self.id).within_timeframe(start_date, due_date).exists?
errors.add(:base, s_("Iteration|Dates cannot overlap with other existing Iterations"))
end