mirror of
https://github.com/status-im/burnchart.git
synced 2025-02-10 17:36:24 +00:00
closes #97
This commit is contained in:
parent
e8a43086d0
commit
c1bac21198
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "burnchart",
|
"name": "burnchart",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"description": "GitHub Burndown Chart as a Service",
|
"description": "GitHub Burndown Chart as a Service",
|
||||||
"author": "Radek Stepan <dev@radekstepan.com> (http://radekstepan.com)",
|
"author": "Radek Stepan <dev@radekstepan.com> (http://radekstepan.com)",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
@ -27,8 +27,9 @@ module.exports = (milestone) ->
|
|||||||
b = do moment.utc
|
b = do moment.utc
|
||||||
c = moment milestone.due_on
|
c = moment milestone.due_on
|
||||||
|
|
||||||
# Overdue?
|
# Overdue? Regardless of the date, if we have closed all
|
||||||
isOverdue = yes if b.isAfter c
|
# issues, we are no longer overdue.
|
||||||
|
isOverdue = yes if b.isAfter c and not isDone
|
||||||
|
|
||||||
# Progress in time.
|
# Progress in time.
|
||||||
time = progress b.diff(a), c.diff(b)
|
time = progress b.diff(a), c.diff(b)
|
||||||
@ -39,6 +40,9 @@ module.exports = (milestone) ->
|
|||||||
# Are we on time?
|
# Are we on time?
|
||||||
isOnTime = points > time
|
isOnTime = points > time
|
||||||
|
|
||||||
|
# If we have closed all issues, we are "on time".
|
||||||
|
isOnTime = yes if isDone
|
||||||
|
|
||||||
{
|
{
|
||||||
isDone, days, isOnTime, isOverdue
|
isDone, days, isOnTime, isOverdue
|
||||||
'progress': { points, time }
|
'progress': { points, time }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user