@@ -62,13 +62,11 @@ asanaModule.controller("createTaskController", ['$scope', 'AsanaGateway', '$time
6262 createTaskCtrl . onProjectSelected = function ( item , model ) {
6363 createTaskCtrl . projectRequired = false ;
6464 if ( item . isTag ) {
65- console . log ( "Creating new project: " + JSON . stringify ( item ) ) ;
6665 var options = { data : { } } ;
6766 options . data . workspace = createTaskCtrl . selectedWorkspaceId ;
6867 options . data . name = item . name ;
6968
7069 AsanaGateway . createNewProject ( options ) . then ( function ( response ) {
71- console . log ( "New project created: " + JSON . stringify ( response ) ) ;
7270 item . id = response . id ;
7371 } ) . catch ( function ( response ) {
7472 console . log ( "New project create failed: " + JSON . stringify ( response ) ) ;
@@ -162,8 +160,6 @@ asanaModule.controller("createTaskController", ['$scope', 'AsanaGateway', '$time
162160 options . data . notes = createTaskCtrl . taskNotes ;
163161
164162 AsanaGateway . createTask ( options ) . then ( function ( response ) {
165- console . log ( "Success: creating task: " + JSON . stringify ( response ) ) ;
166- //createTaskCtrl.selectedWorkspace = {};
167163 createTaskCtrl . clearFields ( ) ;
168164
169165 var containerId = ( response . projects [ 0 ] ) ? response . projects [ 0 ] . id : ( response . tags [ 0 ] ) ? response . tags [ 0 ] . id : ( response . assignee ) ? response . assignee . id : 0 ;
@@ -210,13 +206,10 @@ asanaModule.controller("createTaskController", ['$scope', 'AsanaGateway', '$time
210206 createTaskCtrl . createNewTag = function ( item , model ) {
211207 if ( item . isTag ) {
212208 var tagRef = item ;
213- //var tags = createTaskCtrl.tags;
214- console . log ( "Creating new tag: " + JSON . stringify ( item ) ) ;
215209 var options = { data : { } } ;
216210 options . data . workspace = createTaskCtrl . selectedWorkspaceId ;
217211 options . data . name = item . name ;
218212 AsanaGateway . createNewTag ( options ) . then ( function ( response ) {
219- console . log ( "Create tag success: " + JSON . stringify ( response ) ) ;
220213 tagRef . id = response . id ; //update created tag with new id
221214 //tags.push({"id": response.id, "name": response.name, "notes": response.notes}); //update taglist
222215 } ) . catch ( function ( response ) {
@@ -305,7 +298,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
305298 options . data . workspace = tasksCtrl . selectedWorkspaceId ;
306299 options . data . name = item . name ;
307300 AsanaGateway . createNewTag ( options ) . then ( function ( response ) {
308- console . log ( "Create tag success: " + JSON . stringify ( response ) ) ;
309301 item . id = response . id ; //update created tag with new id
310302 callback ( ) ;
311303 } ) . catch ( function ( response ) {
@@ -334,7 +326,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
334326
335327 AsanaGateway . createNewProject ( options ) . then ( function ( response ) {
336328 item . id = response . id ;
337- console . log ( "New project created: " + JSON . stringify ( response ) ) ;
338329 callback ( ) ;
339330 } ) . catch ( function ( response ) {
340331 console . log ( "New project failed: " + JSON . stringify ( response ) ) ;
@@ -354,12 +345,10 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
354345
355346
356347 tasksCtrl . onProjectSelected = function ( item , model ) {
357- console . log ( "filter on project" ) ;
358348 tasksCtrl . fetchTasks ( ) ;
359349 } ;
360350
361351 tasksCtrl . onTagSelected = function ( item , model ) {
362- console . log ( "filter on tags" ) ;
363352 tasksCtrl . fetchTasks ( ) ;
364353 } ;
365354
@@ -397,84 +386,74 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
397386
398387 tasksCtrl . onProjectAdd = function ( item , model ) {
399388 tasksCtrl . createProject ( item , model , function ( ) {
400- console . log ( "Adding project" ) ;
401389 var options = {
402390 task_id : tasksCtrl . selectedTaskId ,
403391 project_id : item . id
404392 } ;
405393 AsanaGateway . addProjectToTask ( options ) . then ( function ( ) {
406- console . log ( "add project to task" ) ;
394+
407395 } ) . catch ( function ( ) {
408396 console . log ( "could not add project to task" ) ;
409397 } ) ;
410398 } ) ;
411399 } ;
412400
413401 tasksCtrl . onProjectRemove = function ( item , model ) {
414- console . log ( "Removing project" ) ;
415402 var options = {
416403 task_id : tasksCtrl . selectedTaskId ,
417404 project_id : item . id
418405 } ;
419406 AsanaGateway . removeProjectFromTask ( options ) . then ( function ( ) {
420- console . log ( "project removed from task" ) ;
407+
421408 } ) . catch ( function ( ) {
422409 console . log ( "project could not be removed from task" ) ;
423410 } ) ;
424411 } ;
425412
426413 tasksCtrl . onTagAdd = function ( item , model ) {
427414 tasksCtrl . createNewTag ( item , model , function ( ) {
428- console . log ( "tag adding: " ) ;
429415 var options = {
430416 task_id : tasksCtrl . selectedTaskId ,
431417 tag_id : item . id
432418 } ;
433419 AsanaGateway . addTag ( options ) . then ( function ( ) {
434- console . log ( "Tag added" ) ;
435420 } ) . catch ( function ( ) {
436421 console . log ( "Tag add failed" ) ;
437422 } ) ;
438423 } ) ;
439424 } ;
440425
441426 tasksCtrl . onTagRemove = function ( item , model ) {
442- console . log ( "tag removed" ) ;
443427 var options = {
444428 task_id : tasksCtrl . selectedTaskId ,
445429 tag_id : item . id
446430 } ;
447431
448432 AsanaGateway . removeTag ( options ) . then ( function ( ) {
449- console . log ( "Tag removed" ) ;
450433 } ) . catch ( function ( ) {
451434 console . log ( "Tag could not be removed" ) ;
452435 } ) ;
453436 } ;
454437
455438 tasksCtrl . onFollowerAdd = function ( item , model ) {
456- console . log ( "adding follower:" ) ;
457439 var options = {
458440 task_id : tasksCtrl . selectedTaskId ,
459441 follower_id : item . id
460442 } ;
461443 AsanaGateway . addFollowerToTask ( options ) . then ( function ( ) {
462- console . log ( "follower added" ) ;
463444 } ) . catch ( function ( ) {
464- console . log ( "follower added " ) ;
445+ console . log ( "failed to add follower " ) ;
465446 } ) ;
466447 } ;
467448
468449 tasksCtrl . onFollowerRemove = function ( item , model ) {
469- console . log ( "removing follower:" ) ;
470450 var options = {
471451 task_id : tasksCtrl . selectedTaskId ,
472452 follower_id : item . id
473453 } ;
474454 AsanaGateway . removeFollowersFromTask ( options ) . then ( function ( ) {
475- console . log ( "follower removed" ) ;
476455 } ) . catch ( function ( ) {
477- console . log ( "follower removed " ) ;
456+ console . log ( "failed to remove follower " ) ;
478457 } ) ;
479458 } ;
480459
@@ -485,9 +464,8 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
485464 completed : taskNextStatus
486465 } ;
487466 AsanaGateway . taskDone ( option ) . then ( function ( response ) {
488- console . log ( "marked task: " + taskNextStatus ) ;
489467 } ) . catch ( function ( ) {
490- console . log ( "error " ) ;
468+ console . log ( "Error marking task as done " ) ;
491469 } ) ;
492470 } ;
493471
@@ -504,14 +482,11 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
504482 } ;
505483
506484 tasksCtrl . showTask = function ( taskId , index ) {
507- console . log ( "Fetch details of task id: " + taskId ) ;
508485 tasksCtrl . showTaskManager = false ;
509486 tasksCtrl . selectedTaskId = taskId ;
510487 tasksCtrl . selectedTaskIndex = index ;
511488
512- console . log ( "fetching task details: " + tasksCtrl . selectedTaskId ) ;
513489 AsanaGateway . getTaskStories ( { task_id : tasksCtrl . selectedTaskId } ) . then ( function ( response ) {
514- console . dir ( "Stories: " + response ) ;
515490 tasksCtrl . activities = response . filter ( function ( activity ) {
516491 return activity . type === "system" ;
517492 } ) ;
@@ -555,7 +530,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
555530 } ;
556531
557532 tasksCtrl . updateName = function ( ) {
558- console . log ( "Updating task name: " + tasksCtrl . selectedTaskId ) ;
559533 var options = {
560534 task_id : tasksCtrl . selectedTaskId ,
561535 data : {
@@ -566,7 +540,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
566540 } ;
567541
568542 tasksCtrl . updateNotes = function ( ) {
569- console . log ( "Updating task name: " + tasksCtrl . selectedTaskId ) ;
570543 var options = {
571544 task_id : tasksCtrl . selectedTaskId ,
572545 data : {
@@ -577,7 +550,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
577550 } ;
578551
579552 tasksCtrl . updateAssignee = function ( ) {
580- console . log ( "Updating assignee: " + tasksCtrl . selectedTaskId ) ;
581553 var options = {
582554 task_id : tasksCtrl . selectedTaskId
583555 } ;
@@ -594,8 +566,6 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
594566 } ;
595567
596568 tasksCtrl . updateDeadline = function ( ) {
597- //console.log("updating task due date" + tasksCtrl.selectedTaskId);
598- //console.log("type=" + tasksCtrl.taskDetails.deadlineType + " date=" + tasksCtrl.taskDetails.deadline);
599569 var options = {
600570 task_id : tasksCtrl . selectedTaskId
601571 } ;
@@ -619,23 +589,19 @@ asanaModule.controller("tasksController", ["$scope", "AsanaGateway", "ChromeExte
619589 } ;
620590 break ;
621591 }
622- console . log ( "New deadline: " + options . data ) ;
623592 tasksCtrl . updateTask ( options ) ;
624593 } ;
625594
626595 tasksCtrl . updateTask = function ( options ) {
627596 return AsanaGateway . updateTask ( options ) . then ( function ( response ) {
628- console . log ( "updated task: " + JSON . stringify ( response ) ) ;
629597 return response ;
630598 } ) . catch ( function ( ) {
631599 console . log ( "Error occurred updating task" ) ;
632600 } ) ;
633601 } ;
634602
635603 tasksCtrl . addComment = function ( ) {
636- console . log ( "Adding comment: " + tasksCtrl . commentText + " to task_id: " + tasksCtrl . selectedTaskId ) ;
637604 AsanaGateway . addComment ( { task_id : tasksCtrl . selectedTaskId , commentText : tasksCtrl . commentText } ) . then ( function ( response ) {
638- console . log ( "Added comment: " + JSON . stringify ( response ) ) ;
639605 tasksCtrl . comments . push ( {
640606 id : response . id ,
641607 created_at : response . created_at ,
0 commit comments