Skip to content
Snippets Groups Projects

CE upstream

Merged Valery Sizov requested to merge ce_upstream into master
6 files
+ 127
8
Compare changes
  • Side-by-side
  • Inline
Files
6
  • f694f94c
    Added IssueCollection · f694f94c
    Yorick Peterse authored
    This class can be used to reduce a list of issues down to a subset based
    on user permissions. This class operates in such a way that it can
    reduce issues using as few queries as possible, if any at all.
@@ -286,6 +286,11 @@ def can_move?(*)
false
end
def assignee_or_author?(user)
# We're comparing IDs here so we don't need to load any associations.
author_id == user.id || assignee_id == user.id
end
def record_metrics
metrics = self.metrics || create_metrics
metrics.record!
Loading