reset index when reset projects; say when project has no milestones
This commit is contained in:
parent
134f8dc635
commit
1b773df7bb
1
TODO.md
1
TODO.md
|
@ -56,6 +56,7 @@
|
||||||
- [ ] app icon like http://thenounproject.com/term/fire/50966/
|
- [ ] app icon like http://thenounproject.com/term/fire/50966/
|
||||||
- [ ] tell people if they have no due date
|
- [ ] tell people if they have no due date
|
||||||
- [ ] calculate left margin based on the total number of points text width
|
- [ ] calculate left margin based on the total number of points text width
|
||||||
|
- [ ] responsive layout
|
||||||
|
|
||||||
###Customers
|
###Customers
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -113,7 +113,7 @@ module.exports = new Model
|
||||||
throw 500
|
throw 500
|
||||||
|
|
||||||
clear: ->
|
clear: ->
|
||||||
@set 'list', []
|
@set 'list': [], 'index': []
|
||||||
|
|
||||||
# Sort/or insert into an already sorted index.
|
# Sort/or insert into an already sorted index.
|
||||||
sort: (ref, data) ->
|
sort: (ref, data) ->
|
||||||
|
|
|
@ -41,6 +41,8 @@ module.exports = Ractive.extend
|
||||||
milestones.fetchAll project, cb
|
milestones.fetchAll project, cb
|
||||||
|
|
||||||
fetchIssues = (allMilestones, cb) ->
|
fetchIssues = (allMilestones, cb) ->
|
||||||
|
return cb 'The project has no milestones' unless allMilestones.length
|
||||||
|
|
||||||
async.each allMilestones, (milestone, cb) ->
|
async.each allMilestones, (milestone, cb) ->
|
||||||
# Maybe we have this milestone already?
|
# Maybe we have this milestone already?
|
||||||
return cb null if findMilestone milestone.number
|
return cb null if findMilestone milestone.number
|
||||||
|
|
Loading…
Reference in New Issue