Commit 96167244 authored by Jan Provaznik's avatar Jan Provaznik

Switched to id_not_in

parent 388e2a12
......@@ -95,7 +95,6 @@ module EE
scope :due_date_inherited, -> { where(due_date_is_fixed: [nil, false]) }
scope :counts_by_state, -> { group(:state_id).count }
scope :excluding_ids, ->(ids) { where.not(id: ids) }
MAX_HIERARCHY_DEPTH = 5
......
......@@ -21,7 +21,7 @@ module EE
scope :in_epics, ->(epics) do
issue_ids = EpicIssue.where(epic_id: epics).select(:issue_id)
where(id: issue_ids)
id_in(issue_ids)
end
has_one :epic_issue
......
......@@ -31,7 +31,7 @@ module Epics
def epics_count
strong_memoize(:epics_count) do
accessible_epics.excluding_ids([epic.id]).counts_by_state
accessible_epics.id_not_in(epic.id).counts_by_state
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment