{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/37140101","id":37140101,"diff_hunk":"@@ -241,7 +241,25 @@ function civicrm_api3_activity_get($params) {\n     }\n   }\n   else {\n-    $activities = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE);\n+    $extraSql = array();\n+    $options = civicrm_api3('ActivityContact', 'getoptions', array('field' => 'record_type_id'));\n+    $options = $options['values'];\n+    $activityContactOptions = array(\n+      'target_contact_id' => array_search('Activity Targets', $options),\n+      'source_contact_id' => array_search('Activity Source', $options),\n+      'assignee_contact_id' => array_search('Activity Assignees', $options),\n+    );\n+    foreach ($activityContactOptions as $activityContactName => $activityContactValue) {\n+      if (!empty($params[$activityContactName])) {\n+        $extraSql['join'][] = array(\n+          'activity_' . $activityContactName => '\n+          LEFT JOIN civicrm_activity_contact ac ON a.id = ac.activity_id AND ac.record_type_id = ' . $activityContactValue,","path":"api/v3/Activity.php","position":17,"original_position":17,"commit_id":"228a84b786fa4da6bde39b79330c3d1324b74158","original_commit_id":"228a84b786fa4da6bde39b79330c3d1324b74158","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"body":"But on master ... just added https://github.com/civicrm/civicrm-core/compare/master...eileenmcnaughton-patch-1?quick_pull=1","created_at":"2015-08-15T22:34:17Z","updated_at":"2015-08-15T22:34:17Z","html_url":"https://github.com/civicrm/civicrm-core/pull/6447#discussion_r37140101","pull_request_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/37140101"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/6447#discussion_r37140101"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447","id":41963382,"html_url":"https://github.com/civicrm/civicrm-core/pull/6447","diff_url":"https://github.com/civicrm/civicrm-core/pull/6447.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/6447.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/6447","number":6447,"state":"open","locked":false,"title":"16036 WIP","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-09T01:00:19Z","updated_at":"2015-08-15T22:34:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7eb17792ebc8b5dcafc393b4a1951bd36b60a18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447/comments","review_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/6447/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/228a84b786fa4da6bde39b79330c3d1324b74158","head":{"label":"eileenmcnaughton:16036-prog","ref":"16036-prog","sha":"228a84b786fa4da6bde39b79330c3d1324b74158","user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"repo":{"id":8567814,"name":"civicrm-core","full_name":"eileenmcnaughton/civicrm-core","owner":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eileenmcnaughton/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core","forks_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/forks","keys_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/teams","hooks_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/events","assignees_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/tags","blobs_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/subscription","commits_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/merges","archive_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/downloads","issues_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/eileenmcnaughton/civicrm-core/releases{/id}","created_at":"2013-03-04T23:49:52Z","updated_at":"2015-03-23T03:03:28Z","pushed_at":"2015-08-15T19:55:30Z","git_url":"git://github.com/eileenmcnaughton/civicrm-core.git","ssh_url":"git@github.com:eileenmcnaughton/civicrm-core.git","clone_url":"https://github.com/eileenmcnaughton/civicrm-core.git","svn_url":"https://github.com/eileenmcnaughton/civicrm-core","homepage":null,"size":99936,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"code_ideas"}},"base":{"label":"civicrm:4.6","ref":"4.6","sha":"5b4d14007b2da41ba30068bd1ec5d4ec12ba4148","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":8495499,"name":"civicrm-core","full_name":"civicrm/civicrm-core","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":false,"url":"https://api.github.com/repos/civicrm/civicrm-core","forks_url":"https://api.github.com/repos/civicrm/civicrm-core/forks","keys_url":"https://api.github.com/repos/civicrm/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civicrm-core/teams","hooks_url":"https://api.github.com/repos/civicrm/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civicrm-core/events","assignees_url":"https://api.github.com/repos/civicrm/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civicrm-core/tags","blobs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/civicrm/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civicrm-core/subscription","commits_url":"https://api.github.com/repos/civicrm/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civicrm-core/merges","archive_url":"https://api.github.com/repos/civicrm/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civicrm-core/downloads","issues_url":"https://api.github.com/repos/civicrm/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civicrm-core/releases{/id}","created_at":"2013-03-01T06:11:56Z","updated_at":"2015-08-08T05:32:39Z","pushed_at":"2015-08-15T22:34:00Z","git_url":"git://github.com/civicrm/civicrm-core.git","ssh_url":"git@github.com:civicrm/civicrm-core.git","clone_url":"https://github.com/civicrm/civicrm-core.git","svn_url":"https://github.com/civicrm/civicrm-core","homepage":null,"size":141311,"stargazers_count":117,"watchers_count":117,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":311,"mirror_url":null,"open_issues_count":91,"forks":311,"open_issues":91,"watchers":117,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/6447"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/6447"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/6447/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/6447/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/228a84b786fa4da6bde39b79330c3d1324b74158"}}}}