{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/24450697","id":24450697,"diff_hunk":"@@ -169,6 +169,26 @@ class ReportbackFileEntityController extends EntityAPIController {\n   }\n \n   /**\n+   * Overrides save() method.\n+   *\n+   * Updates count variables for corresponding nodes and taxonomy terms.\n+   */\n+  public function save($entity, DatabaseTransaction $transaction = NULL) {\n+    if (DOSOMETHING_REPORTBACK_LOG) {\n+      watchdog('dosomething_reportback_file', 'save:' . json_encode($entity));\n+    }\n+    $status = NULL;","path":"lib/modules/dosomething/dosomething_reportback/includes/dosomething_reportback_file.inc","position":12,"original_position":12,"commit_id":"a808ce2cd09b5ac8b7cb18a573b056bf8840afc5","original_commit_id":"a808ce2cd09b5ac8b7cb18a573b056bf8840afc5","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"Just checked, and `entity->is_new` is not set after the save. Ok to leave in?","created_at":"2015-02-10T21:09:07Z","updated_at":"2015-02-10T21:09:07Z","html_url":"https://github.com/DoSomething/dosomething/pull/3928#discussion_r24450697","pull_request_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/24450697"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3928#discussion_r24450697"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928","id":29043765,"html_url":"https://github.com/DoSomething/dosomething/pull/3928","diff_url":"https://github.com/DoSomething/dosomething/pull/3928.diff","patch_url":"https://github.com/DoSomething/dosomething/pull/3928.patch","issue_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3928","number":3928,"state":"open","locked":false,"title":"Update Campaign RB Totals upon Reportback File Save ","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"body":"Per convo with @sergii-tkachenko today re: #3874\r\n\r\nInstead of relying on the Review Form to calculate Entity Reportback totals, calculate the relevant total per saving a Reportback File.\r\n\r\nThis PR calculates the total for the node reported back on. Following PR will update the node's Cause term totals.","created_at":"2015-02-10T20:55:30Z","updated_at":"2015-02-10T21:09:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48199707879620ede038b03041b4bc82d2aa44b0","assignee":{"login":"sergii-tkachenko","id":672669,"avatar_url":"https://avatars.githubusercontent.com/u/672669?v=3","gravatar_id":"","url":"https://api.github.com/users/sergii-tkachenko","html_url":"https://github.com/sergii-tkachenko","followers_url":"https://api.github.com/users/sergii-tkachenko/followers","following_url":"https://api.github.com/users/sergii-tkachenko/following{/other_user}","gists_url":"https://api.github.com/users/sergii-tkachenko/gists{/gist_id}","starred_url":"https://api.github.com/users/sergii-tkachenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergii-tkachenko/subscriptions","organizations_url":"https://api.github.com/users/sergii-tkachenko/orgs","repos_url":"https://api.github.com/users/sergii-tkachenko/repos","events_url":"https://api.github.com/users/sergii-tkachenko/events{/privacy}","received_events_url":"https://api.github.com/users/sergii-tkachenko/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928/commits","review_comments_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928/comments","review_comment_url":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/issues/3928/comments","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/a808ce2cd09b5ac8b7cb18a573b056bf8840afc5","head":{"label":"aaronschachter:totals_update","ref":"totals_update","sha":"a808ce2cd09b5ac8b7cb18a573b056bf8840afc5","user":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"repo":{"id":24475000,"name":"dosomething","full_name":"aaronschachter/dosomething","owner":{"login":"aaronschachter","id":1236811,"avatar_url":"https://avatars.githubusercontent.com/u/1236811?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronschachter","html_url":"https://github.com/aaronschachter","followers_url":"https://api.github.com/users/aaronschachter/followers","following_url":"https://api.github.com/users/aaronschachter/following{/other_user}","gists_url":"https://api.github.com/users/aaronschachter/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronschachter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronschachter/subscriptions","organizations_url":"https://api.github.com/users/aaronschachter/orgs","repos_url":"https://api.github.com/users/aaronschachter/repos","events_url":"https://api.github.com/users/aaronschachter/events{/privacy}","received_events_url":"https://api.github.com/users/aaronschachter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronschachter/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/aaronschachter/dosomething","forks_url":"https://api.github.com/repos/aaronschachter/dosomething/forks","keys_url":"https://api.github.com/repos/aaronschachter/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronschachter/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronschachter/dosomething/teams","hooks_url":"https://api.github.com/repos/aaronschachter/dosomething/hooks","issue_events_url":"https://api.github.com/repos/aaronschachter/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/aaronschachter/dosomething/events","assignees_url":"https://api.github.com/repos/aaronschachter/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/aaronschachter/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/aaronschachter/dosomething/tags","blobs_url":"https://api.github.com/repos/aaronschachter/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronschachter/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronschachter/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronschachter/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronschachter/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronschachter/dosomething/languages","stargazers_url":"https://api.github.com/repos/aaronschachter/dosomething/stargazers","contributors_url":"https://api.github.com/repos/aaronschachter/dosomething/contributors","subscribers_url":"https://api.github.com/repos/aaronschachter/dosomething/subscribers","subscription_url":"https://api.github.com/repos/aaronschachter/dosomething/subscription","commits_url":"https://api.github.com/repos/aaronschachter/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronschachter/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronschachter/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronschachter/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/aaronschachter/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/aaronschachter/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronschachter/dosomething/merges","archive_url":"https://api.github.com/repos/aaronschachter/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronschachter/dosomething/downloads","issues_url":"https://api.github.com/repos/aaronschachter/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/aaronschachter/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronschachter/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronschachter/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronschachter/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/aaronschachter/dosomething/releases{/id}","created_at":"2014-09-25T20:57:35Z","updated_at":"2015-02-10T19:50:35Z","pushed_at":"2015-02-10T21:05:54Z","git_url":"git://github.com/aaronschachter/dosomething.git","ssh_url":"git@github.com:aaronschachter/dosomething.git","clone_url":"https://github.com/aaronschachter/dosomething.git","svn_url":"https://github.com/aaronschachter/dosomething","homepage":"http://www.dosomething.org/","size":13203,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"DoSomething:dev","ref":"dev","sha":"a02b53e016d5290e900f41b09d3d01777cb261e6","user":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"repo":{"id":13592927,"name":"dosomething","full_name":"DoSomething/dosomething","owner":{"login":"DoSomething","id":731685,"avatar_url":"https://avatars.githubusercontent.com/u/731685?v=3","gravatar_id":"","url":"https://api.github.com/users/DoSomething","html_url":"https://github.com/DoSomething","followers_url":"https://api.github.com/users/DoSomething/followers","following_url":"https://api.github.com/users/DoSomething/following{/other_user}","gists_url":"https://api.github.com/users/DoSomething/gists{/gist_id}","starred_url":"https://api.github.com/users/DoSomething/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoSomething/subscriptions","organizations_url":"https://api.github.com/users/DoSomething/orgs","repos_url":"https://api.github.com/users/DoSomething/repos","events_url":"https://api.github.com/users/DoSomething/events{/privacy}","received_events_url":"https://api.github.com/users/DoSomething/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DoSomething/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/dosomething","forks_url":"https://api.github.com/repos/DoSomething/dosomething/forks","keys_url":"https://api.github.com/repos/DoSomething/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/dosomething/teams","hooks_url":"https://api.github.com/repos/DoSomething/dosomething/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/dosomething/events","assignees_url":"https://api.github.com/repos/DoSomething/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/dosomething/tags","blobs_url":"https://api.github.com/repos/DoSomething/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/dosomething/languages","stargazers_url":"https://api.github.com/repos/DoSomething/dosomething/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/dosomething/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/dosomething/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/dosomething/subscription","commits_url":"https://api.github.com/repos/DoSomething/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/dosomething/issues/comments/{number}","contents_url":"https://api.github.com/repos/DoSomething/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/dosomething/merges","archive_url":"https://api.github.com/repos/DoSomething/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/dosomething/downloads","issues_url":"https://api.github.com/repos/DoSomething/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/dosomething/releases{/id}","created_at":"2013-10-15T14:50:48Z","updated_at":"2015-02-10T20:15:44Z","pushed_at":"2015-02-10T20:15:44Z","git_url":"git://github.com/DoSomething/dosomething.git","ssh_url":"git@github.com:DoSomething/dosomething.git","clone_url":"https://github.com/DoSomething/dosomething.git","svn_url":"https://github.com/DoSomething/dosomething","homepage":"http://www.dosomething.org/","size":22415,"stargazers_count":20,"watchers_count":20,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":213,"forks":13,"open_issues":213,"watchers":20,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928"},"html":{"href":"https://github.com/DoSomething/dosomething/pull/3928"},"issue":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3928"},"comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/issues/3928/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/dosomething/pulls/3928/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/dosomething/statuses/a808ce2cd09b5ac8b7cb18a573b056bf8840afc5"}}}}