diff options
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r-- | app/models/todo.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb index 62252912c32..e1b5076e3d8 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -13,6 +13,7 @@ class Todo < ApplicationRecord # and giving it back again. WAIT_FOR_DELETE = 1.hour + # Actions ASSIGNED = 1 MENTIONED = 2 BUILD_FAILED = 3 @@ -76,10 +77,11 @@ class Todo < ApplicationRecord scope :for_target, -> (id) { where(target_id: id) } scope :for_commit, -> (id) { where(commit_id: id) } scope :with_entity_associations, -> do - preload(:target, :author, :note, group: :route, project: [:route, { namespace: [:route, :owner] }, :project_setting]) + preload(:target, :author, :note, group: :route, project: [:route, :group, { namespace: [:route, :owner] }, :project_setting]) end scope :joins_issue_and_assignees, -> { left_joins(issue: :assignees) } scope :for_internal_notes, -> { joins(:note).where(note: { confidential: true }) } + scope :with_preloaded_user, -> { preload(:user) } enum resolved_by_action: { system_done: 0, api_all_done: 1, api_done: 2, mark_all_done: 3, mark_done: 4 }, _prefix: :resolved_by |