{"action":"created","comment":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/50902072","id":50902072,"diff_hunk":"@@ -408,6 +413,17 @@ protected function getLanguage() {\n   }\n \n   /**\n+   * Get campaign's latest news.\n+   *\n+   * @return array\n+   */\n+  protected function getLatestNews() {\n+    return [\n+      'latest_news' => dosomething_helpers_extract_field_data($this->node->field_latest_news_copy),","path":"lib/modules/dosomething/dosomething_campaign/includes/Campaign.php","position":29,"original_position":29,"commit_id":"595fcfec969b8a30b663899659806ec4d1d005be","original_commit_id":"595fcfec969b8a30b663899659806ec4d1d005be","user":{"login":"weerd","id":105849,"avatar_url":"https://avatars.githubusercontent.com/u/105849?v=3","gravatar_id":"","url":"https://api.github.com/users/weerd","html_url":"https://github.com/weerd","followers_url":"https://api.github.com/users/weerd/followers","following_url":"https://api.github.com/users/weerd/following{/other_user}","gists_url":"https://api.github.com/users/weerd/gists{/gist_id}","starred_url":"https://api.github.com/users/weerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weerd/subscriptions","organizations_url":"https://api.github.com/users/weerd/orgs","repos_url":"https://api.github.com/users/weerd/repos","events_url":"https://api.github.com/users/weerd/events{/privacy}","received_events_url":"https://api.github.com/users/weerd/received_events","type":"User","site_admin":false},"body":"Is there a way to test what the would return if it has sample data in it? Cause if it returns an array of stuff, those may need to be further processed... I could envision the `latest_news` property being an array of latest news objects with their own data...","created_at":"2016-01-26T21:23:25Z","updated_at":"2016-01-26T21:23:25Z","html_url":"https://github.com/DoSomething/phoenix/pull/6089#discussion_r50902072","pull_request_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089","_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments/50902072"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/6089#discussion_r50902072"},"pull_request":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089"}}},"pull_request":{"url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089","id":57259338,"html_url":"https://github.com/DoSomething/phoenix/pull/6089","diff_url":"https://github.com/DoSomething/phoenix/pull/6089.diff","patch_url":"https://github.com/DoSomething/phoenix/pull/6089.patch","issue_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6089","number":6089,"state":"open","locked":false,"title":"returns all missing information","user":{"login":"chloealee","id":9019452,"avatar_url":"https://avatars.githubusercontent.com/u/9019452?v=3","gravatar_id":"","url":"https://api.github.com/users/chloealee","html_url":"https://github.com/chloealee","followers_url":"https://api.github.com/users/chloealee/followers","following_url":"https://api.github.com/users/chloealee/following{/other_user}","gists_url":"https://api.github.com/users/chloealee/gists{/gist_id}","starred_url":"https://api.github.com/users/chloealee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chloealee/subscriptions","organizations_url":"https://api.github.com/users/chloealee/orgs","repos_url":"https://api.github.com/users/chloealee/repos","events_url":"https://api.github.com/users/chloealee/events{/privacy}","received_events_url":"https://api.github.com/users/chloealee/received_events","type":"User","site_admin":false},"body":"#### What does this PR do? \r\nReturns missing information needed for weekly digest email message by Message Broker for `/api/v1/campaigns/:nid` endpoint. \r\n\r\n#### Where should the reviewer start? \r\n`Campaign.php` then to `Transformer.php`\r\n#### How should this be manually tested? \r\nMake sure `/api/v1/campaigns/:nid` endpoint has returns information for `pre_step_header`, `promoting_tips`, and `latest_news`. Use http://dev.dosomething.org:8888/api/v1/campaigns/362 to check Comeback Clothes. \r\n\r\n#### Notes\r\nNot sure if the labels `pre_step_header` and `promoting_tips` are the most intuitive. Would it make more sense to change these to `during_tips_header` and `during_tips_copy` or even separate into \r\n```\r\n-during_tips: {\r\n  - header: \"Run Your Drive!\", \r\n  - copy: {\r\n      raw: \"Make flyers with the nearest drop-off box location. Put them on trash cans so people recycle     their clothes instead of throwing them away.\",\r\nformatted: \"<p>Make flyers with the nearest drop-off box location. Put them on trash cans so people recycle their clothes instead of throwing them away.</p> \"\r\n}\r\n```\r\n\r\nAlso, sometimes `latest_news` will return `null`. Is this okay for when using to populate content the email digest?\r\ncc: @DeeZone \r\n    \r\n#### What are the relevant tickets?\r\nFixes #6077 ","created_at":"2016-01-26T19:31:53Z","updated_at":"2016-01-26T21:23:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94d7057f9299e52f0b6904aca246859a7cb99b10","assignee":{"login":"weerd","id":105849,"avatar_url":"https://avatars.githubusercontent.com/u/105849?v=3","gravatar_id":"","url":"https://api.github.com/users/weerd","html_url":"https://github.com/weerd","followers_url":"https://api.github.com/users/weerd/followers","following_url":"https://api.github.com/users/weerd/following{/other_user}","gists_url":"https://api.github.com/users/weerd/gists{/gist_id}","starred_url":"https://api.github.com/users/weerd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weerd/subscriptions","organizations_url":"https://api.github.com/users/weerd/orgs","repos_url":"https://api.github.com/users/weerd/repos","events_url":"https://api.github.com/users/weerd/events{/privacy}","received_events_url":"https://api.github.com/users/weerd/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089/commits","review_comments_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089/comments","review_comment_url":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/issues/6089/comments","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/595fcfec969b8a30b663899659806ec4d1d005be","head":{"label":"chloealee:missing-fields-campaigns-response","ref":"missing-fields-campaigns-response","sha":"595fcfec969b8a30b663899659806ec4d1d005be","user":{"login":"chloealee","id":9019452,"avatar_url":"https://avatars.githubusercontent.com/u/9019452?v=3","gravatar_id":"","url":"https://api.github.com/users/chloealee","html_url":"https://github.com/chloealee","followers_url":"https://api.github.com/users/chloealee/followers","following_url":"https://api.github.com/users/chloealee/following{/other_user}","gists_url":"https://api.github.com/users/chloealee/gists{/gist_id}","starred_url":"https://api.github.com/users/chloealee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chloealee/subscriptions","organizations_url":"https://api.github.com/users/chloealee/orgs","repos_url":"https://api.github.com/users/chloealee/repos","events_url":"https://api.github.com/users/chloealee/events{/privacy}","received_events_url":"https://api.github.com/users/chloealee/received_events","type":"User","site_admin":false},"repo":{"id":38055093,"name":"dosomething","full_name":"chloealee/dosomething","owner":{"login":"chloealee","id":9019452,"avatar_url":"https://avatars.githubusercontent.com/u/9019452?v=3","gravatar_id":"","url":"https://api.github.com/users/chloealee","html_url":"https://github.com/chloealee","followers_url":"https://api.github.com/users/chloealee/followers","following_url":"https://api.github.com/users/chloealee/following{/other_user}","gists_url":"https://api.github.com/users/chloealee/gists{/gist_id}","starred_url":"https://api.github.com/users/chloealee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chloealee/subscriptions","organizations_url":"https://api.github.com/users/chloealee/orgs","repos_url":"https://api.github.com/users/chloealee/repos","events_url":"https://api.github.com/users/chloealee/events{/privacy}","received_events_url":"https://api.github.com/users/chloealee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chloealee/dosomething","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":true,"url":"https://api.github.com/repos/chloealee/dosomething","forks_url":"https://api.github.com/repos/chloealee/dosomething/forks","keys_url":"https://api.github.com/repos/chloealee/dosomething/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chloealee/dosomething/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chloealee/dosomething/teams","hooks_url":"https://api.github.com/repos/chloealee/dosomething/hooks","issue_events_url":"https://api.github.com/repos/chloealee/dosomething/issues/events{/number}","events_url":"https://api.github.com/repos/chloealee/dosomething/events","assignees_url":"https://api.github.com/repos/chloealee/dosomething/assignees{/user}","branches_url":"https://api.github.com/repos/chloealee/dosomething/branches{/branch}","tags_url":"https://api.github.com/repos/chloealee/dosomething/tags","blobs_url":"https://api.github.com/repos/chloealee/dosomething/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chloealee/dosomething/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chloealee/dosomething/git/refs{/sha}","trees_url":"https://api.github.com/repos/chloealee/dosomething/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chloealee/dosomething/statuses/{sha}","languages_url":"https://api.github.com/repos/chloealee/dosomething/languages","stargazers_url":"https://api.github.com/repos/chloealee/dosomething/stargazers","contributors_url":"https://api.github.com/repos/chloealee/dosomething/contributors","subscribers_url":"https://api.github.com/repos/chloealee/dosomething/subscribers","subscription_url":"https://api.github.com/repos/chloealee/dosomething/subscription","commits_url":"https://api.github.com/repos/chloealee/dosomething/commits{/sha}","git_commits_url":"https://api.github.com/repos/chloealee/dosomething/git/commits{/sha}","comments_url":"https://api.github.com/repos/chloealee/dosomething/comments{/number}","issue_comment_url":"https://api.github.com/repos/chloealee/dosomething/issues/comments{/number}","contents_url":"https://api.github.com/repos/chloealee/dosomething/contents/{+path}","compare_url":"https://api.github.com/repos/chloealee/dosomething/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chloealee/dosomething/merges","archive_url":"https://api.github.com/repos/chloealee/dosomething/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chloealee/dosomething/downloads","issues_url":"https://api.github.com/repos/chloealee/dosomething/issues{/number}","pulls_url":"https://api.github.com/repos/chloealee/dosomething/pulls{/number}","milestones_url":"https://api.github.com/repos/chloealee/dosomething/milestones{/number}","notifications_url":"https://api.github.com/repos/chloealee/dosomething/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chloealee/dosomething/labels{/name}","releases_url":"https://api.github.com/repos/chloealee/dosomething/releases{/id}","deployments_url":"https://api.github.com/repos/chloealee/dosomething/deployments","created_at":"2015-06-25T14:43:06Z","updated_at":"2016-01-12T20:45:42Z","pushed_at":"2016-01-26T21:12:04Z","git_url":"git://github.com/chloealee/dosomething.git","ssh_url":"git@github.com:chloealee/dosomething.git","clone_url":"https://github.com/chloealee/dosomething.git","svn_url":"https://github.com/chloealee/dosomething","homepage":"http://www.dosomething.org/","size":16002,"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":"71d572ee80a53567223848027e9fd464611343b5","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":"phoenix","full_name":"DoSomething/phoenix","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/phoenix","description":"A Drupal 7 distribution that powers the DoSomething.org web platform.","fork":false,"url":"https://api.github.com/repos/DoSomething/phoenix","forks_url":"https://api.github.com/repos/DoSomething/phoenix/forks","keys_url":"https://api.github.com/repos/DoSomething/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoSomething/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoSomething/phoenix/teams","hooks_url":"https://api.github.com/repos/DoSomething/phoenix/hooks","issue_events_url":"https://api.github.com/repos/DoSomething/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/DoSomething/phoenix/events","assignees_url":"https://api.github.com/repos/DoSomething/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/DoSomething/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/DoSomething/phoenix/tags","blobs_url":"https://api.github.com/repos/DoSomething/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoSomething/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoSomething/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoSomething/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoSomething/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/DoSomething/phoenix/languages","stargazers_url":"https://api.github.com/repos/DoSomething/phoenix/stargazers","contributors_url":"https://api.github.com/repos/DoSomething/phoenix/contributors","subscribers_url":"https://api.github.com/repos/DoSomething/phoenix/subscribers","subscription_url":"https://api.github.com/repos/DoSomething/phoenix/subscription","commits_url":"https://api.github.com/repos/DoSomething/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoSomething/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoSomething/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoSomething/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoSomething/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/DoSomething/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoSomething/phoenix/merges","archive_url":"https://api.github.com/repos/DoSomething/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoSomething/phoenix/downloads","issues_url":"https://api.github.com/repos/DoSomething/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/DoSomething/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/DoSomething/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/DoSomething/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoSomething/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/DoSomething/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/DoSomething/phoenix/deployments","created_at":"2013-10-15T14:50:48Z","updated_at":"2016-01-11T18:53:47Z","pushed_at":"2016-01-26T21:12:04Z","git_url":"git://github.com/DoSomething/phoenix.git","ssh_url":"git@github.com:DoSomething/phoenix.git","clone_url":"https://github.com/DoSomething/phoenix.git","svn_url":"https://github.com/DoSomething/phoenix","homepage":"http://www.dosomething.org/","size":16714,"stargazers_count":28,"watchers_count":28,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":250,"forks":18,"open_issues":250,"watchers":28,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089"},"html":{"href":"https://github.com/DoSomething/phoenix/pull/6089"},"issue":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6089"},"comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/issues/6089/comments"},"review_comments":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089/comments"},"review_comment":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DoSomething/phoenix/pulls/6089/commits"},"statuses":{"href":"https://api.github.com/repos/DoSomething/phoenix/statuses/595fcfec969b8a30b663899659806ec4d1d005be"}}}}