Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
7937321b
Commit
7937321b
authored
Aug 09, 2016
by
Douglas Barbosa Alexandre
Committed by
Phil Hughes
Aug 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Order issues by label priority instead of id on board lists
parent
57deadce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
app/assets/javascripts/boards/models/issue.js.es6
app/assets/javascripts/boards/models/issue.js.es6
+4
-0
app/assets/javascripts/boards/models/label.js.es6
app/assets/javascripts/boards/models/label.js.es6
+1
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+1
-1
No files found.
app/assets/javascripts/boards/models/issue.js.es6
View file @
7937321b
...
@@ -12,6 +12,10 @@ class Issue {
...
@@ -12,6 +12,10 @@ class Issue {
obj.labels.forEach((label) => {
obj.labels.forEach((label) => {
this.labels.push(new Label(label));
this.labels.push(new Label(label));
});
});
this.priority = this.labels.reduce((max, label) => {
return (label.priority < max) ? label.priority : max;
}, Infinity);
}
}
addLabel (label) {
addLabel (label) {
...
...
app/assets/javascripts/boards/models/label.js.es6
View file @
7937321b
...
@@ -4,5 +4,6 @@ class Label {
...
@@ -4,5 +4,6 @@ class Label {
this.title = obj.title;
this.title = obj.title;
this.color = obj.color;
this.color = obj.color;
this.description = obj.description;
this.description = obj.description;
this.priority = (obj.priority !== null) ? obj.priority : Infinity;
}
}
}
}
app/views/projects/boards/components/_card.html.haml
View file @
7937321b
%board-card
{
"inline-template"
=>
true
,
%board-card
{
"inline-template"
=>
true
,
"v-for"
=>
"issue in issues | orderBy
'id' -1
"
,
"v-for"
=>
"issue in issues | orderBy
['priority', 'id']
"
,
":issue"
=>
"issue"
,
":issue"
=>
"issue"
,
":issue-link-base"
=>
"issueLinkBase"
,
":issue-link-base"
=>
"issueLinkBase"
,
":disabled"
=>
"disabled"
,
":disabled"
=>
"disabled"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment