Commit 7937321b authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre Committed by Phil Hughes

Order issues by label priority instead of id on board lists

parent 57deadce
......@@ -12,6 +12,10 @@ class Issue {
obj.labels.forEach((label) => {
this.labels.push(new Label(label));
});
this.priority = this.labels.reduce((max, label) => {
return (label.priority < max) ? label.priority : max;
}, Infinity);
}
addLabel (label) {
......
......@@ -4,5 +4,6 @@ class Label {
this.title = obj.title;
this.color = obj.color;
this.description = obj.description;
this.priority = (obj.priority !== null) ? obj.priority : Infinity;
}
}
%board-card{ "inline-template" => true,
"v-for" => "issue in issues | orderBy 'id' -1",
"v-for" => "issue in issues | orderBy ['priority', 'id']",
":issue" => "issue",
":issue-link-base" => "issueLinkBase",
":disabled" => "disabled",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment