Fix sorting merge requests by priority

This commit is contained in:
Douglas Barbosa Alexandre 2016-10-17 18:50:49 -02:00
parent 928acba4c0
commit 301264bead

View file

@ -145,10 +145,16 @@ module Issuable
end
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 = {
target_type: name,
target_column: "#{table_name}.id",
project_column: "#{table_name}.project_id",
project_column: project_column,
excluded_labels: excluded_labels
}