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/todo.rb')
-rw-r--r--app/models/todo.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb
index 45ab770a0f6..cff7a93f72f 100644
--- a/app/models/todo.rb
+++ b/app/models/todo.rb
@@ -230,6 +230,10 @@ class Todo < ApplicationRecord
target_type == AlertManagement::Alert.name
end
+ def for_issue_or_work_item?
+ [Issue.name, WorkItem.name].any? { |klass_name| target_type == klass_name }
+ end
+
# override to return commits, which are not active record
def target
if for_commit?