{"action":"created","comment":{"url":"https://api.github.com/repos/singpath/classmentors/pulls/comments/79519703","id":79519703,"diff_hunk":"@@ -185,20 +183,80 @@ export function challengeServiceFactory\n         delete copy.singPathProblem;\n         delete copy.badge;\n         delete copy.answers;\n+        if(copy.link == \"\"){\n+          delete copy.link;\n+        }\n         console.log(copy);\n         // Create reccord in eventTeams\n-\n-        // Create reccord in answers and tasks\n-        var ref = clmDataStore.events.addTaskWithAns(event.$id, copy, isOpen,answers);\n-        ref.then(function() {\n-            spfAlert.success('Task created');\n-            $location.path(urlFor('editEvent', {eventId: event.$id}));\n-        }).catch(function(err) {\n-            $log.error(err);\n-            spfAlert.error('Failed to created new task');\n-        }).finally(function() {\n-            self.creatingTask = false;\n+        // Add IRAT\n+        clmDataStore.events.addTaskWithAns(event.$id, copy, isOpen,answers)\n+          .then(function(ref){\n+            //add Team formation task\n+            var previousTaskId = ref.key();\n+            console.log('IRAT key is :', previousTaskId);\n+            clmDataStore.events.addTeamFormation(event.$id, {\n+                taskFrom: previousTaskId,\n+                title: copy.title,\n+                description: \"Click Below To Join Team\",\n+                formationPattern: true,\n+                closedAt : {'.sv': 'timestamp'},\n+                showProgress: copy.showProgress,\n+                archived: false,\n+                teamFormationMethod: copy.teamFormationMethod\n+            }, copy.priority).then(function(teamRef){\n+              //create teams here\n+              var taskId = teamRef.key()\n+              console.log('taskId: ', taskId);\n+              console.log(event.teams);\n+              spfFirebase.set(['classMentors/eventTeams', event.$id],taskId)","path":"src/classmentors/components/challenges/challenges.js","position":82,"original_position":82,"commit_id":"24acb272c73145ee85700649b4ec8f2e062eb81a","original_commit_id":"24acb272c73145ee85700649b4ec8f2e062eb81a","user":{"login":"dinoboff","id":6830,"avatar_url":"https://avatars.githubusercontent.com/u/6830?v=3","gravatar_id":"","url":"https://api.github.com/users/dinoboff","html_url":"https://github.com/dinoboff","followers_url":"https://api.github.com/users/dinoboff/followers","following_url":"https://api.github.com/users/dinoboff/following{/other_user}","gists_url":"https://api.github.com/users/dinoboff/gists{/gist_id}","starred_url":"https://api.github.com/users/dinoboff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinoboff/subscriptions","organizations_url":"https://api.github.com/users/dinoboff/orgs","repos_url":"https://api.github.com/users/dinoboff/repos","events_url":"https://api.github.com/users/dinoboff/events{/privacy}","received_events_url":"https://api.github.com/users/dinoboff/received_events","type":"User","site_admin":false},"body":"Here, you trying to set `classMentors/eventTeams/$eventId` to a literal value...","created_at":"2016-09-20T00:55:24Z","updated_at":"2016-09-20T00:55:24Z","html_url":"https://github.com/singpath/classmentors/pull/109#discussion_r79519703","pull_request_url":"https://api.github.com/repos/singpath/classmentors/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/comments/79519703"},"html":{"href":"https://github.com/singpath/classmentors/pull/109#discussion_r79519703"},"pull_request":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/singpath/classmentors/pulls/109","id":85715488,"html_url":"https://github.com/singpath/classmentors/pull/109","diff_url":"https://github.com/singpath/classmentors/pull/109.diff","patch_url":"https://github.com/singpath/classmentors/pull/109.patch","issue_url":"https://api.github.com/repos/singpath/classmentors/issues/109","number":109,"state":"open","locked":false,"title":"Cohort filtered ranking","user":{"login":"shiquan-lim","id":19287054,"avatar_url":"https://avatars.githubusercontent.com/u/19287054?v=3","gravatar_id":"","url":"https://api.github.com/users/shiquan-lim","html_url":"https://github.com/shiquan-lim","followers_url":"https://api.github.com/users/shiquan-lim/followers","following_url":"https://api.github.com/users/shiquan-lim/following{/other_user}","gists_url":"https://api.github.com/users/shiquan-lim/gists{/gist_id}","starred_url":"https://api.github.com/users/shiquan-lim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiquan-lim/subscriptions","organizations_url":"https://api.github.com/users/shiquan-lim/orgs","repos_url":"https://api.github.com/users/shiquan-lim/repos","events_url":"https://api.github.com/users/shiquan-lim/events{/privacy}","received_events_url":"https://api.github.com/users/shiquan-lim/received_events","type":"User","site_admin":false},"body":"Implemented Cohort filtered ranking and sorted out most conflicts between the 3.0 update and the team's code.\r\n\r\nTeam activities are not included in this update","created_at":"2016-09-18T16:42:20Z","updated_at":"2016-09-20T00:55:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19f53d7117b08e8862cae0148adebbf34d42802a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/singpath/classmentors/pulls/109/commits","review_comments_url":"https://api.github.com/repos/singpath/classmentors/pulls/109/comments","review_comment_url":"https://api.github.com/repos/singpath/classmentors/pulls/comments{/number}","comments_url":"https://api.github.com/repos/singpath/classmentors/issues/109/comments","statuses_url":"https://api.github.com/repos/singpath/classmentors/statuses/24acb272c73145ee85700649b4ec8f2e062eb81a","head":{"label":"shiquan-lim:3.0-holding-master","ref":"3.0-holding-master","sha":"24acb272c73145ee85700649b4ec8f2e062eb81a","user":{"login":"shiquan-lim","id":19287054,"avatar_url":"https://avatars.githubusercontent.com/u/19287054?v=3","gravatar_id":"","url":"https://api.github.com/users/shiquan-lim","html_url":"https://github.com/shiquan-lim","followers_url":"https://api.github.com/users/shiquan-lim/followers","following_url":"https://api.github.com/users/shiquan-lim/following{/other_user}","gists_url":"https://api.github.com/users/shiquan-lim/gists{/gist_id}","starred_url":"https://api.github.com/users/shiquan-lim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiquan-lim/subscriptions","organizations_url":"https://api.github.com/users/shiquan-lim/orgs","repos_url":"https://api.github.com/users/shiquan-lim/repos","events_url":"https://api.github.com/users/shiquan-lim/events{/privacy}","received_events_url":"https://api.github.com/users/shiquan-lim/received_events","type":"User","site_admin":false},"repo":{"id":58467135,"name":"classmentors","full_name":"shiquan-lim/classmentors","owner":{"login":"shiquan-lim","id":19287054,"avatar_url":"https://avatars.githubusercontent.com/u/19287054?v=3","gravatar_id":"","url":"https://api.github.com/users/shiquan-lim","html_url":"https://github.com/shiquan-lim","followers_url":"https://api.github.com/users/shiquan-lim/followers","following_url":"https://api.github.com/users/shiquan-lim/following{/other_user}","gists_url":"https://api.github.com/users/shiquan-lim/gists{/gist_id}","starred_url":"https://api.github.com/users/shiquan-lim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiquan-lim/subscriptions","organizations_url":"https://api.github.com/users/shiquan-lim/orgs","repos_url":"https://api.github.com/users/shiquan-lim/repos","events_url":"https://api.github.com/users/shiquan-lim/events{/privacy}","received_events_url":"https://api.github.com/users/shiquan-lim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shiquan-lim/classmentors","description":"Class Mentors UI","fork":true,"url":"https://api.github.com/repos/shiquan-lim/classmentors","forks_url":"https://api.github.com/repos/shiquan-lim/classmentors/forks","keys_url":"https://api.github.com/repos/shiquan-lim/classmentors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shiquan-lim/classmentors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shiquan-lim/classmentors/teams","hooks_url":"https://api.github.com/repos/shiquan-lim/classmentors/hooks","issue_events_url":"https://api.github.com/repos/shiquan-lim/classmentors/issues/events{/number}","events_url":"https://api.github.com/repos/shiquan-lim/classmentors/events","assignees_url":"https://api.github.com/repos/shiquan-lim/classmentors/assignees{/user}","branches_url":"https://api.github.com/repos/shiquan-lim/classmentors/branches{/branch}","tags_url":"https://api.github.com/repos/shiquan-lim/classmentors/tags","blobs_url":"https://api.github.com/repos/shiquan-lim/classmentors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shiquan-lim/classmentors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shiquan-lim/classmentors/git/refs{/sha}","trees_url":"https://api.github.com/repos/shiquan-lim/classmentors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shiquan-lim/classmentors/statuses/{sha}","languages_url":"https://api.github.com/repos/shiquan-lim/classmentors/languages","stargazers_url":"https://api.github.com/repos/shiquan-lim/classmentors/stargazers","contributors_url":"https://api.github.com/repos/shiquan-lim/classmentors/contributors","subscribers_url":"https://api.github.com/repos/shiquan-lim/classmentors/subscribers","subscription_url":"https://api.github.com/repos/shiquan-lim/classmentors/subscription","commits_url":"https://api.github.com/repos/shiquan-lim/classmentors/commits{/sha}","git_commits_url":"https://api.github.com/repos/shiquan-lim/classmentors/git/commits{/sha}","comments_url":"https://api.github.com/repos/shiquan-lim/classmentors/comments{/number}","issue_comment_url":"https://api.github.com/repos/shiquan-lim/classmentors/issues/comments{/number}","contents_url":"https://api.github.com/repos/shiquan-lim/classmentors/contents/{+path}","compare_url":"https://api.github.com/repos/shiquan-lim/classmentors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shiquan-lim/classmentors/merges","archive_url":"https://api.github.com/repos/shiquan-lim/classmentors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shiquan-lim/classmentors/downloads","issues_url":"https://api.github.com/repos/shiquan-lim/classmentors/issues{/number}","pulls_url":"https://api.github.com/repos/shiquan-lim/classmentors/pulls{/number}","milestones_url":"https://api.github.com/repos/shiquan-lim/classmentors/milestones{/number}","notifications_url":"https://api.github.com/repos/shiquan-lim/classmentors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shiquan-lim/classmentors/labels{/name}","releases_url":"https://api.github.com/repos/shiquan-lim/classmentors/releases{/id}","deployments_url":"https://api.github.com/repos/shiquan-lim/classmentors/deployments","created_at":"2016-05-10T14:14:36Z","updated_at":"2016-06-30T17:25:26Z","pushed_at":"2016-09-19T08:36:32Z","git_url":"git://github.com/shiquan-lim/classmentors.git","ssh_url":"git@github.com:shiquan-lim/classmentors.git","clone_url":"https://github.com/shiquan-lim/classmentors.git","svn_url":"https://github.com/shiquan-lim/classmentors","homepage":"http://www.classmentors.com","size":10499,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":40,"forks":1,"open_issues":40,"watchers":1,"default_branch":"master"}},"base":{"label":"singpath:master","ref":"master","sha":"bd4fa362a8826844017d238b969adfa9ec906eec","user":{"login":"singpath","id":15899764,"avatar_url":"https://avatars.githubusercontent.com/u/15899764?v=3","gravatar_id":"","url":"https://api.github.com/users/singpath","html_url":"https://github.com/singpath","followers_url":"https://api.github.com/users/singpath/followers","following_url":"https://api.github.com/users/singpath/following{/other_user}","gists_url":"https://api.github.com/users/singpath/gists{/gist_id}","starred_url":"https://api.github.com/users/singpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singpath/subscriptions","organizations_url":"https://api.github.com/users/singpath/orgs","repos_url":"https://api.github.com/users/singpath/repos","events_url":"https://api.github.com/users/singpath/events{/privacy}","received_events_url":"https://api.github.com/users/singpath/received_events","type":"Organization","site_admin":false},"repo":{"id":53763096,"name":"classmentors","full_name":"singpath/classmentors","owner":{"login":"singpath","id":15899764,"avatar_url":"https://avatars.githubusercontent.com/u/15899764?v=3","gravatar_id":"","url":"https://api.github.com/users/singpath","html_url":"https://github.com/singpath","followers_url":"https://api.github.com/users/singpath/followers","following_url":"https://api.github.com/users/singpath/following{/other_user}","gists_url":"https://api.github.com/users/singpath/gists{/gist_id}","starred_url":"https://api.github.com/users/singpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singpath/subscriptions","organizations_url":"https://api.github.com/users/singpath/orgs","repos_url":"https://api.github.com/users/singpath/repos","events_url":"https://api.github.com/users/singpath/events{/privacy}","received_events_url":"https://api.github.com/users/singpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/singpath/classmentors","description":"Class Mentors UI","fork":false,"url":"https://api.github.com/repos/singpath/classmentors","forks_url":"https://api.github.com/repos/singpath/classmentors/forks","keys_url":"https://api.github.com/repos/singpath/classmentors/keys{/key_id}","collaborators_url":"https://api.github.com/repos/singpath/classmentors/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/singpath/classmentors/teams","hooks_url":"https://api.github.com/repos/singpath/classmentors/hooks","issue_events_url":"https://api.github.com/repos/singpath/classmentors/issues/events{/number}","events_url":"https://api.github.com/repos/singpath/classmentors/events","assignees_url":"https://api.github.com/repos/singpath/classmentors/assignees{/user}","branches_url":"https://api.github.com/repos/singpath/classmentors/branches{/branch}","tags_url":"https://api.github.com/repos/singpath/classmentors/tags","blobs_url":"https://api.github.com/repos/singpath/classmentors/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/singpath/classmentors/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/singpath/classmentors/git/refs{/sha}","trees_url":"https://api.github.com/repos/singpath/classmentors/git/trees{/sha}","statuses_url":"https://api.github.com/repos/singpath/classmentors/statuses/{sha}","languages_url":"https://api.github.com/repos/singpath/classmentors/languages","stargazers_url":"https://api.github.com/repos/singpath/classmentors/stargazers","contributors_url":"https://api.github.com/repos/singpath/classmentors/contributors","subscribers_url":"https://api.github.com/repos/singpath/classmentors/subscribers","subscription_url":"https://api.github.com/repos/singpath/classmentors/subscription","commits_url":"https://api.github.com/repos/singpath/classmentors/commits{/sha}","git_commits_url":"https://api.github.com/repos/singpath/classmentors/git/commits{/sha}","comments_url":"https://api.github.com/repos/singpath/classmentors/comments{/number}","issue_comment_url":"https://api.github.com/repos/singpath/classmentors/issues/comments{/number}","contents_url":"https://api.github.com/repos/singpath/classmentors/contents/{+path}","compare_url":"https://api.github.com/repos/singpath/classmentors/compare/{base}...{head}","merges_url":"https://api.github.com/repos/singpath/classmentors/merges","archive_url":"https://api.github.com/repos/singpath/classmentors/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/singpath/classmentors/downloads","issues_url":"https://api.github.com/repos/singpath/classmentors/issues{/number}","pulls_url":"https://api.github.com/repos/singpath/classmentors/pulls{/number}","milestones_url":"https://api.github.com/repos/singpath/classmentors/milestones{/number}","notifications_url":"https://api.github.com/repos/singpath/classmentors/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/singpath/classmentors/labels{/name}","releases_url":"https://api.github.com/repos/singpath/classmentors/releases{/id}","deployments_url":"https://api.github.com/repos/singpath/classmentors/deployments","created_at":"2016-03-13T02:08:02Z","updated_at":"2016-03-15T17:13:27Z","pushed_at":"2016-09-19T15:44:56Z","git_url":"git://github.com/singpath/classmentors.git","ssh_url":"git@github.com:singpath/classmentors.git","clone_url":"https://github.com/singpath/classmentors.git","svn_url":"https://github.com/singpath/classmentors","homepage":"http://www.classmentors.com","size":12525,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"open_issues_count":12,"forks":9,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/109"},"html":{"href":"https://github.com/singpath/classmentors/pull/109"},"issue":{"href":"https://api.github.com/repos/singpath/classmentors/issues/109"},"comments":{"href":"https://api.github.com/repos/singpath/classmentors/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/singpath/classmentors/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/singpath/classmentors/statuses/24acb272c73145ee85700649b4ec8f2e062eb81a"}}}}
{"actor":{"display_login":"dinoboff"}}