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:
Diffstat (limited to 'app/models/concerns/timebox.rb')
-rw-r--r--app/models/concerns/timebox.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/models/concerns/timebox.rb b/app/models/concerns/timebox.rb
index 8927e42dd97..3e2cf9031d0 100644
--- a/app/models/concerns/timebox.rb
+++ b/app/models/concerns/timebox.rb
@@ -75,8 +75,8 @@ module Timebox
scope :within_timeframe, -> (start_date, end_date) do
where('start_date is not NULL or due_date is not NULL')
- .where('start_date is NULL or start_date <= ?', end_date)
- .where('due_date is NULL or due_date >= ?', start_date)
+ .where('start_date is NULL or start_date <= ?', end_date)
+ .where('due_date is NULL or due_date >= ?', start_date)
end
strip_attributes :title
@@ -195,6 +195,10 @@ module Timebox
end
end
+ def weight_available?
+ resource_parent&.feature_available?(:issue_weights)
+ end
+
private
def timebox_format_reference(format = :iid)