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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
4f341ed8
Commit
4f341ed8
authored
Aug 19, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed frontend to use issue count from backend
parent
246bb231
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
app/assets/javascripts/boards/models/list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+5
-1
app/views/projects/boards/components/_board.html.haml
app/views/projects/boards/components/_board.html.haml
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+2
-4
No files found.
app/assets/javascripts/boards/models/list.js.es6
View file @
4f341ed8
...
...
@@ -11,6 +11,7 @@ class List {
this.loading = true;
this.loadingMore = false;
this.issues = [];
this.issuesSize = 0;
if (obj.label) {
this.label = new ListLabel(obj.label);
...
...
@@ -76,12 +77,13 @@ class List {
.then((resp) => {
const data = resp.json();
this.loading = false;
this.issuesSize = data.size;
if (emptyIssues) {
this.issues = [];
}
this.createIssues(data);
this.createIssues(data
.issues
);
});
}
...
...
@@ -99,6 +101,7 @@ class List {
}
if (listFrom) {
this.issuesSize++;
gl.boardService.moveIssue(issue.id, listFrom.id, this.id);
}
}
...
...
@@ -112,6 +115,7 @@ class List {
const matchesRemove = removeIssue.id === issue.id;
if (matchesRemove) {
this.issuesSize--;
issue.removeLabel(this.label);
}
...
...
app/views/projects/boards/components/_board.html.haml
View file @
4f341ed8
...
...
@@ -13,7 +13,7 @@
%h3
.board-title.js-board-handle
{
":class"
=>
"{ 'user-can-drag': (!disabled && !list.preset) }"
}
{{ list.title }}
%span
.pull-right
{
"v-if"
=>
"list.type !== 'blank'"
}
{{ list.issues
.length
}}
{{ list.issues
Size
}}
-
if
can?
(
current_user
,
:admin_list
,
@project
)
%board-delete
{
"inline-template"
=>
true
,
":list"
=>
"list"
,
...
...
spec/features/boards/boards_spec.rb
View file @
4f341ed8
...
...
@@ -182,13 +182,12 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
20
'
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
56
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
wait_for_vue_resource
(
spinner:
false
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'40'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
end
end
...
...
@@ -479,12 +478,11 @@ describe 'Issue Boards', feature: true, js: true do
wait_for_vue_resource
page
.
within
(
find
(
'.board'
,
match: :first
))
do
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
20
'
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'
51
'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
20
)
evaluate_script
(
"document.querySelectorAll('.board .board-list')[0].scrollTop = document.querySelectorAll('.board .board-list')[0].scrollHeight"
)
expect
(
page
.
find
(
'.board-header'
)).
to
have_content
(
'40'
)
expect
(
page
).
to
have_selector
(
'.card'
,
count:
40
)
end
end
...
...
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