Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 15:08:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 15:08:34 +0300
commit0820b29dca14bd22c2cee6d9ee2900b64385bfa6 (patch)
tree3637b0c997f5764c7255b830ffe32e53ac7ce078 /app/controllers/boards
parent778772c8d97adc025c126a941a1bd37bf72419ac (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/boards')
-rw-r--r--app/controllers/boards/issues_controller.rb29
1 files changed, 18 insertions, 11 deletions
diff --git a/app/controllers/boards/issues_controller.rb b/app/controllers/boards/issues_controller.rb
index 99c48186fba..1d6711e3c22 100644
--- a/app/controllers/boards/issues_controller.rb
+++ b/app/controllers/boards/issues_controller.rb
@@ -27,17 +27,7 @@ module Boards
issues = list_service.execute
issues = issues.page(params[:page]).per(params[:per] || 20).without_count
Issue.move_nulls_to_end(issues) if Gitlab::Database.read_write?
- issues = issues.preload(:milestone,
- :assignees,
- project: [
- :route,
- {
- namespace: [:route]
- }
- ],
- labels: [:priorities],
- notes: [:award_emoji, :author]
- )
+ issues = issues.preload(associations_to_preload)
render_issues(issues, list_service.metadata)
end
@@ -74,6 +64,21 @@ module Boards
private
+ def associations_to_preload
+ [
+ :milestone,
+ :assignees,
+ project: [
+ :route,
+ {
+ namespace: [:route]
+ }
+ ],
+ labels: [:priorities],
+ notes: [:award_emoji, :author]
+ ]
+ end
+
def can_move_issues?
head(:forbidden) unless can?(current_user, :admin_issue, board)
end
@@ -139,3 +144,5 @@ module Boards
end
end
end
+
+Boards::IssuesController.prepend_if_ee('EE::Boards::IssuesController')