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>2021-03-29 12:09:15 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-29 12:09:15 +0300
commit290b2ab01becf60d9eaf1094b620f1fb32fdccb3 (patch)
treec0bde0f7c121b5bc878e858dbaaf904f24d9ee6b /app/models
parent5169d58a9dd60d54cd40f325431658b1436497c2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/bulk_imports/tracker.rb2
-rw-r--r--app/models/merge_request.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/bulk_imports/tracker.rb b/app/models/bulk_imports/tracker.rb
index 8d16edccd5b..cf84414f9cf 100644
--- a/app/models/bulk_imports/tracker.rb
+++ b/app/models/bulk_imports/tracker.rb
@@ -18,6 +18,8 @@ class BulkImports::Tracker < ApplicationRecord
validates :stage, presence: true
+ DEFAULT_PAGE_SIZE = 500
+
state_machine :status, initial: :created do
state :created, value: 0
state :started, value: 1
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 720ee6f23d8..4a3162c5aa6 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -316,7 +316,7 @@ class MergeRequest < ApplicationRecord
}
scope :with_csv_entity_associations, -> { preload(:assignees, :approved_by_users, :author, :milestone, metrics: [:merged_by]) }
- scope :with_jira_integration_associations, -> { preload(:metrics, :assignees, :author, :target_project, :source_project) }
+ scope :with_jira_integration_associations, -> { preload_routables.preload(:metrics, :assignees, :author) }
scope :by_target_branch_wildcard, ->(wildcard_branch_name) do
where("target_branch LIKE ?", ApplicationRecord.sanitize_sql_like(wildcard_branch_name).tr('*', '%'))