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
ab1fe3ce
Commit
ab1fe3ce
authored
Oct 03, 2019
by
Wei-Meng Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix burndown negative count edge case
parent
5439bfe4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
ee/app/assets/javascripts/burndown_chart/burndown_chart_data.js
.../assets/javascripts/burndown_chart/burndown_chart_data.js
+1
-1
ee/changelogs/unreleased/weimeng-fix-burndown-chart-reset-logic.yml
...ogs/unreleased/weimeng-fix-burndown-chart-reset-logic.yml
+5
-0
ee/spec/frontend/burndown_chart/burndown_chart_data_spec.js
ee/spec/frontend/burndown_chart/burndown_chart_data_spec.js
+2
-1
No files found.
ee/app/assets/javascripts/burndown_chart/burndown_chart_data.js
View file @
ab1fe3ce
...
...
@@ -53,7 +53,7 @@ export default class BurndownChartData {
// weight count on an given date. To mitigate this, we reset the current
// date's counters to 0 and carry forward the negative count to a future
// date until the total is positive again.
if
(
openIssuesCount
<
0
||
openIssuesWeight
<
0
)
{
if
(
openIssuesCount
<
=
0
||
openIssuesWeight
<=
0
)
{
carriedIssuesCount
=
openIssuesCount
;
carriedIssuesWeight
=
openIssuesWeight
;
...
...
ee/changelogs/unreleased/weimeng-fix-burndown-chart-reset-logic.yml
0 → 100644
View file @
ab1fe3ce
---
title
:
Fix burndown negative count edge case
merge_request
:
18053
author
:
type
:
fixed
ee/spec/frontend/burndown_chart/burndown_chart_data_spec.js
View file @
ab1fe3ce
...
...
@@ -93,6 +93,7 @@ describe('BurndownChartData', () => {
{
created_at
:
'
2017-03-01T00:00:00.000Z
'
,
weight
:
2
,
action
:
'
closed
'
},
{
created_at
:
'
2017-03-01T00:00:00.000Z
'
,
weight
:
2
,
action
:
'
closed
'
},
{
created_at
:
'
2017-03-01T00:00:00.000Z
'
,
weight
:
2
,
action
:
'
closed
'
},
{
created_at
:
'
2017-03-02T00:00:00.000Z
'
,
weight
:
2
,
action
:
'
created
'
},
);
});
...
...
@@ -100,7 +101,7 @@ describe('BurndownChartData', () => {
expect
(
burndownChartData
.
generate
()).
toEqual
([
[
'
2017-03-01
'
,
0
,
0
],
[
'
2017-03-02
'
,
0
,
0
],
[
'
2017-03-03
'
,
1
,
2
],
[
'
2017-03-03
'
,
2
,
4
],
]);
});
});
...
...
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