Fix sorting merge requests by priority
This commit is contained in:
parent
928acba4c0
commit
301264bead
1 changed files with 7 additions and 1 deletions
|
@ -145,10 +145,16 @@ module Issuable
|
||||||
end
|
end
|
||||||
|
|
||||||
def order_labels_priority(excluded_labels: [])
|
def order_labels_priority(excluded_labels: [])
|
||||||
|
project_column =
|
||||||
|
case table_name
|
||||||
|
when Issue.table_name then "#{table_name}.project_id"
|
||||||
|
when MergeRequest.table_name then "#{table_name}.target_project_id"
|
||||||
|
end
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
target_type: name,
|
target_type: name,
|
||||||
target_column: "#{table_name}.id",
|
target_column: "#{table_name}.id",
|
||||||
project_column: "#{table_name}.project_id",
|
project_column: project_column,
|
||||||
excluded_labels: excluded_labels
|
excluded_labels: excluded_labels
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue