{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/22700622","id":22700622,"diff_hunk":"@@ -1931,17 +1998,23 @@ function _civicrm_api3_api_match_pseudoconstant(&$params, $entity, $fieldName, $\n     }\n     $options = civicrm_api($entity, 'getoptions', array('version' => 3, 'field' => $fieldInfo['name'], 'context' => 'validate'));\n     $options = CRM_Utils_Array::value('values', $options, array());\n+\n+    if (count($options) == 0 && isset($pseudoconstant['table'])) {\n+        $pseudoParams = $pseudoconstant;\n+        unset($pseudoParams['table']);\n+        $options = CRM_Core_PseudoConstant::get(CRM_Core_DAO_AllCoreTables::getClassForTable($pseudoconstant['table']), $fieldName, $pseudoParams);","path":"api/v3/utils.php","position":284,"original_position":284,"commit_id":"562d59281d0432e4188eceecaaddf7df4e6b64c3","original_commit_id":"562d59281d0432e4188eceecaaddf7df4e6b64c3","user":{"login":"monishdeb","id":3735621,"avatar_url":"https://avatars.githubusercontent.com/u/3735621?v=3","gravatar_id":"","url":"https://api.github.com/users/monishdeb","html_url":"https://github.com/monishdeb","followers_url":"https://api.github.com/users/monishdeb/followers","following_url":"https://api.github.com/users/monishdeb/following{/other_user}","gists_url":"https://api.github.com/users/monishdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/monishdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monishdeb/subscriptions","organizations_url":"https://api.github.com/users/monishdeb/orgs","repos_url":"https://api.github.com/users/monishdeb/repos","events_url":"https://api.github.com/users/monishdeb/events{/privacy}","received_events_url":"https://api.github.com/users/monishdeb/received_events","type":"User","site_admin":false},"body":"Those attribute(s) which has pseudo property as 'table' and specific keyColumn/LabelColumn value didn't fall under 'getoptions' api. Like in xml you will find that I have added pseudoconstant for contrubution_soft.pcp_id\r\n<pseudoconstant>\r\n+      <table>civicrm_pcp</table>\r\n+      <keyColumn>id</keyColumn>\r\n+      <labelColumn>title</labelColumn>\r\n+    </pseudoconstant>\r\nSo no options (id=>title) get retrieved via getoptions.api so I handled it in here to support 'pseudoconstant' property too not ONLY 'option'\r\n\r\n  I'll surely add a comment above this code. ","created_at":"2015-01-09T04:02:28Z","updated_at":"2015-01-09T04:02:28Z","html_url":"https://github.com/civicrm/civicrm-core/pull/4876#discussion_r22700622","pull_request_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/22700622"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/4876#discussion_r22700622"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876","id":27021665,"html_url":"https://github.com/civicrm/civicrm-core/pull/4876","diff_url":"https://github.com/civicrm/civicrm-core/pull/4876.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/4876.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/4876","number":4876,"state":"open","locked":false,"title":"CRM-15619","user":{"login":"kurund","id":151481,"avatar_url":"https://avatars.githubusercontent.com/u/151481?v=3","gravatar_id":"","url":"https://api.github.com/users/kurund","html_url":"https://github.com/kurund","followers_url":"https://api.github.com/users/kurund/followers","following_url":"https://api.github.com/users/kurund/following{/other_user}","gists_url":"https://api.github.com/users/kurund/gists{/gist_id}","starred_url":"https://api.github.com/users/kurund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurund/subscriptions","organizations_url":"https://api.github.com/users/kurund/orgs","repos_url":"https://api.github.com/users/kurund/repos","events_url":"https://api.github.com/users/kurund/events{/privacy}","received_events_url":"https://api.github.com/users/kurund/received_events","type":"User","site_admin":false},"body":"https://issues.civicrm.org/jira/browse/CRM-15619","created_at":"2015-01-08T11:16:45Z","updated_at":"2015-01-09T04:02:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34c6bc1ce7c71ed582b72f769b7019954a2e26ca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876/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/4876/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/562d59281d0432e4188eceecaaddf7df4e6b64c3","head":{"label":"kurund:CRM-15619","ref":"CRM-15619","sha":"562d59281d0432e4188eceecaaddf7df4e6b64c3","user":{"login":"kurund","id":151481,"avatar_url":"https://avatars.githubusercontent.com/u/151481?v=3","gravatar_id":"","url":"https://api.github.com/users/kurund","html_url":"https://github.com/kurund","followers_url":"https://api.github.com/users/kurund/followers","following_url":"https://api.github.com/users/kurund/following{/other_user}","gists_url":"https://api.github.com/users/kurund/gists{/gist_id}","starred_url":"https://api.github.com/users/kurund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurund/subscriptions","organizations_url":"https://api.github.com/users/kurund/orgs","repos_url":"https://api.github.com/users/kurund/repos","events_url":"https://api.github.com/users/kurund/events{/privacy}","received_events_url":"https://api.github.com/users/kurund/received_events","type":"User","site_admin":false},"repo":{"id":8498155,"name":"civicrm-core","full_name":"kurund/civicrm-core","owner":{"login":"kurund","id":151481,"avatar_url":"https://avatars.githubusercontent.com/u/151481?v=3","gravatar_id":"","url":"https://api.github.com/users/kurund","html_url":"https://github.com/kurund","followers_url":"https://api.github.com/users/kurund/followers","following_url":"https://api.github.com/users/kurund/following{/other_user}","gists_url":"https://api.github.com/users/kurund/gists{/gist_id}","starred_url":"https://api.github.com/users/kurund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurund/subscriptions","organizations_url":"https://api.github.com/users/kurund/orgs","repos_url":"https://api.github.com/users/kurund/repos","events_url":"https://api.github.com/users/kurund/events{/privacy}","received_events_url":"https://api.github.com/users/kurund/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kurund/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/kurund/civicrm-core","forks_url":"https://api.github.com/repos/kurund/civicrm-core/forks","keys_url":"https://api.github.com/repos/kurund/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kurund/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kurund/civicrm-core/teams","hooks_url":"https://api.github.com/repos/kurund/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/kurund/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/kurund/civicrm-core/events","assignees_url":"https://api.github.com/repos/kurund/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/kurund/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/kurund/civicrm-core/tags","blobs_url":"https://api.github.com/repos/kurund/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kurund/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kurund/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/kurund/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kurund/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/kurund/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/kurund/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/kurund/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/kurund/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/kurund/civicrm-core/subscription","commits_url":"https://api.github.com/repos/kurund/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/kurund/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/kurund/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/kurund/civicrm-core/issues/comments/{number}","contents_url":"https://api.github.com/repos/kurund/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/kurund/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kurund/civicrm-core/merges","archive_url":"https://api.github.com/repos/kurund/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kurund/civicrm-core/downloads","issues_url":"https://api.github.com/repos/kurund/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/kurund/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/kurund/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/kurund/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kurund/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/kurund/civicrm-core/releases{/id}","created_at":"2013-03-01T09:27:06Z","updated_at":"2015-01-08T11:36:57Z","pushed_at":"2015-01-08T11:37:32Z","git_url":"git://github.com/kurund/civicrm-core.git","ssh_url":"git@github.com:kurund/civicrm-core.git","clone_url":"https://github.com/kurund/civicrm-core.git","svn_url":"https://github.com/kurund/civicrm-core","homepage":null,"size":66598,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"civicrm:master","ref":"master","sha":"66bc3be2e031f0d6bdc31ded9d4dc9e214b2c25e","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-01-09T01:31:34Z","pushed_at":"2015-01-09T01:31:32Z","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":104322,"stargazers_count":83,"watchers_count":83,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":253,"mirror_url":null,"open_issues_count":27,"forks":253,"open_issues":27,"watchers":83,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/4876"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/4876"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/4876/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/4876/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/4876/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/562d59281d0432e4188eceecaaddf7df4e6b64c3"}}}}