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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-15 06:09:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-15 06:09:42 +0300
commita3ac132686ea5e5e83c184334bf7f03bb641211c (patch)
tree3b4539cc9160c79b07e14637a97c67eb57ff3093 /app
parent0c6c91556b89efac59a1034f7f91fd37a7f8ea91 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue1
-rw-r--r--app/models/issue.rb16
2 files changed, 15 insertions, 2 deletions
diff --git a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue
index a7ff9c0efc8..2e00a23de7c 100644
--- a/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue
+++ b/app/assets/javascripts/sidebar/components/sidebar_dropdown_widget.vue
@@ -125,6 +125,7 @@ export default {
return {
fullPath: this.attrWorkspacePath,
title: this.searchTerm,
+ in: this.searchTerm && this.issuableAttribute === IssuableType.Epic ? 'TITLE' : undefined,
state: this.$options.IssuableAttributeState[this.issuableAttribute],
sort: this.issuableAttribute === IssuableType.Epic ? defaultEpicSort : null,
};
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 7926c4be489..00fcba5298a 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -196,11 +196,23 @@ class Issue < ApplicationRecord
end
end
- # Alias to state machine .with_state_id method
- # This needs to be defined after the state machine block to avoid errors
class << self
+ extend ::Gitlab::Utils::Override
+
+ # Alias to state machine .with_state_id method
+ # This needs to be defined after the state machine block to avoid errors
alias_method :with_state, :with_state_id
alias_method :with_states, :with_state_ids
+
+ override :order_upvotes_desc
+ def order_upvotes_desc
+ reorder(upvotes_count: :desc)
+ end
+
+ override :order_upvotes_asc
+ def order_upvotes_asc
+ reorder(upvotes_count: :asc)
+ end
end
def self.relative_positioning_query_base(issue)