summaryrefslogtreecommitdiff
path: root/app/models/project_label.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-28 00:43:31 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-31 23:27:49 -0200
commitbc7895fff80a038ff14e7319ef303e58474d161c (patch)
treedcfbddb6993b66b74f4f7fffc61f8b073f32aaa3 /app/models/project_label.rb
parent2525e55ec9bdd4b3a9e3284c71fde978cab6483a (diff)
downloadgitlab-ce-bc7895fff80a038ff14e7319ef303e58474d161c.tar.gz
Use label subject to calculate number of issues/mrs within the group
Diffstat (limited to 'app/models/project_label.rb')
-rw-r--r--app/models/project_label.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/project_label.rb b/app/models/project_label.rb
index 33c2b617715..82f47f0e8fd 100644
--- a/app/models/project_label.rb
+++ b/app/models/project_label.rb
@@ -12,6 +12,10 @@ class ProjectLabel < Label
alias_attribute :subject, :project
+ def subject_foreign_key
+ 'project_id'
+ end
+
def to_reference(target_project = nil, format: :id)
super(project, target_project, format: format)
end