Skip to content
This repository was archived by the owner on Nov 7, 2018. It is now read-only.

Commit 8a48fb8

Browse files
Merge branch 'development' into issue-5
2 parents 2f990f8 + 7d92982 commit 8a48fb8

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

dashboard-project-api/common/models/userStory.js

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,24 +68,22 @@ module.exports = function(UserStory) {
6868
})
6969

7070
blueprintsResume.percentage = (blueprintsResume.completed/blueprintsResume.total)*100;
71-
71+
7272
return blueprintsResume;
7373
}
7474

75-
//get the field lastupdated for a usterStory
75+
//get the field lastupdated for a usterStory
7676
var getLastUpdated = function(userStory, cb){
7777
var Patch = app.models.Patch;
7878
var lastUpdate = '';
7979

8080
Patch.latestUpdate(userStory.source, function (err, response, next) {
8181
response = JSON.parse(response.substring(5));
8282

83-
console.log('response', response);
84-
8583
if(response.length > 0){
8684
lastUpdate = response.map( function each (element){
8785
return element.updated
88-
}).sort().shift();
86+
}).sort().pop();
8987
var arrayLastUpdate = lastUpdate.split(' ');
9088
lastUpdate = arrayLastUpdate[0];
9189

@@ -100,7 +98,7 @@ module.exports = function(UserStory) {
10098

10199
// Parse data from userStory
102100
var parseUserStory = function(userStory, callback){
103-
101+
104102
async.waterfall([function(cb){
105103

106104
getLastUpdated(userStory, cb)
@@ -112,7 +110,7 @@ module.exports = function(UserStory) {
112110
userStory.completed = getbluePrintResume(userStory);
113111

114112
cb(null, userStory);
115-
113+
116114
},function(userStory, cb){
117115

118116
var tasksName = userStory.tasks;
@@ -289,7 +287,7 @@ module.exports = function(UserStory) {
289287

290288
}
291289

292-
290+
293291

294292
UserStory.on('attached',function(){
295293

@@ -302,8 +300,7 @@ module.exports = function(UserStory) {
302300
}else{
303301
cb('File does not exist', null);
304302
}
305-
306-
303+
307304
};//end find by id
308305

309306
UserStory.find = function(params, cb){
@@ -316,7 +313,7 @@ module.exports = function(UserStory) {
316313
async.waterfall([function(cb){
317314
getLastUpdated(userStory, cb)
318315
},function(lastUpdated, cb){
319-
316+
320317
var itemResult = {
321318
completed: getbluePrintResume(userStory),
322319
dateCreated: userStory.date,
@@ -326,7 +323,7 @@ module.exports = function(UserStory) {
326323
};
327324

328325
cb(null, itemResult);
329-
326+
330327
}],function(err,result){
331328
callback( err, result);
332329
})

dashboard-project-app/Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ module.exports = function (grunt) {
314314
development: {
315315
constants: function() {
316316
var config = require('./' + grunt.config.get('ngconstant.options.configPath'))
317-
config.apiBaseUrl = 'http://localhost:3004/';
317+
config.apiBaseUrl = 'http://localhost:3004/api';
318318
return { appConfig : config};
319319
}
320320
},

0 commit comments

Comments
 (0)