summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-10-26 13:24:42 +0000
committerLin Jen-Shin <godfat@godfat.org>2016-10-26 13:24:42 +0000
commit7cdb238ac507b85a606e0e64c71373c2fc37254c (patch)
tree6b418da1ea83e175124ad599db488ee494b990a1 /app/models
parent51a012b8a855874df71802fdaa807559ff9817ae (diff)
parent0e544db657ecd2d5497bb6ff47a04fe128ca4ec2 (diff)
downloadgitlab-ce-7cdb238ac507b85a606e0e64c71373c2fc37254c.tar.gz
Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (65 commits) Fixed typo in css class Merge branch 'airat/gitlab-ce-23268-fix-milestones-filtering' into 'master' Escape quotes in gl_dropdown values to prevent exceptions Fixes various errors when adding deploy keys caused by not exiting the control flow. Fix typo on /help/ui to Alerts section Grapify tags API Add 8.13.1 CHANGELOG entries Fix sidekiq stats in admin area Remove use of wait_for_ajax since jQuery was removed Specify which Fog storage drivers are imported by default in backup_restore.md Moved avatar infront of labels Don't schedule ProjectCacheWorker unless needed Fixed height of sidebar causing scrolling issues Reduce overhead of LabelFinder by avoiding #presence call Fixed users profile link in sidebar Fixed new labels not being created Improve redis config tasks for migration paths job Ensure search val is defined. Ensure cursor is applied to end of issues search input. Increase debounce wait on issues search execution. Keep the new resque.yml aside and use it once we've checked out master ...
Diffstat (limited to 'app/models')
-rw-r--r--app/models/issue.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 89158a50353..e356fe06363 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -287,10 +287,12 @@ class Issue < ActiveRecord::Base
def as_json(options = {})
super(options).tap do |json|
+ json[:subscribed] = subscribed?(options[:user]) if options.has_key?(:user)
+
if options.has_key?(:labels)
json[:labels] = labels.as_json(
project: project,
- only: [:id, :title, :description, :color],
+ only: [:id, :title, :description, :color, :priority],
methods: [:text_color]
)
end