{"action":"closed","number":11293,"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11293","id":153357162,"html_url":"https://github.com/civicrm/civicrm-core/pull/11293","diff_url":"https://github.com/civicrm/civicrm-core/pull/11293.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/11293.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/11293","number":11293,"state":"closed","locked":false,"title":"CRM-21447: Relationship Report: move variable handling to beginPostProcessCommon","user":{"login":"mlutfy","id":254741,"avatar_url":"https://avatars3.githubusercontent.com/u/254741?v=4","gravatar_id":"","url":"https://api.github.com/users/mlutfy","html_url":"https://github.com/mlutfy","followers_url":"https://api.github.com/users/mlutfy/followers","following_url":"https://api.github.com/users/mlutfy/following{/other_user}","gists_url":"https://api.github.com/users/mlutfy/gists{/gist_id}","starred_url":"https://api.github.com/users/mlutfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlutfy/subscriptions","organizations_url":"https://api.github.com/users/mlutfy/orgs","repos_url":"https://api.github.com/users/mlutfy/repos","events_url":"https://api.github.com/users/mlutfy/events{/privacy}","received_events_url":"https://api.github.com/users/mlutfy/received_events","type":"User","site_admin":false},"body":"Overview\r\n----------------------------------------\r\n\r\nFor 99.99% of users, this should not have an impact. However, for people accessing the report from the APIv3, this fixes using a report instance where the report filters on a `relationship_type_id`. It also fixes a bug when exporting report data with the [Export to Excel extension](https://github.com/mlutfy/ca.bidon.civiexportexcel/).\r\n\r\nBefore\r\n----------------------------------------\r\n\r\nfatal error   `Unknown column '11_b_a' in 'where clause'`\r\n\r\nAfter\r\n----------------------------------------\r\n\r\nno fatal error 🌈 \r\n\r\nTechnical Details\r\n----------------------------------------\r\n\r\nI moved a hack from the `postProcess()` to `beginCommonPostProcess()`.\r\n\r\nComments\r\n----------------------------------------\r\n\r\nYou can test from the API Explorer:\r\n\r\n* Create a report instance of `contact/relationship` that has a filter on \"relationship Type\" = \"<any relationship>\"\r\n* Take note of the `instance_id`\r\n* Go to the API Explorer (`civicrm/api/explorer`), and run: `ReportTemplate.getrows` with variable: `instance_id=1234`  (where 1234 is your `instance_id` noted above).\r\n","created_at":"2017-11-17T17:51:30Z","updated_at":"2017-11-17T22:55:35Z","closed_at":"2017-11-17T22:55:34Z","merged_at":"2017-11-17T22:55:34Z","merge_commit_sha":"788e77ea9a505edc642d4026b2d0d6e6056c3cb2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11293/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11293/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/11293/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/99a555a5a33a1bab313e224b6e277def664f83f0","head":{"label":"mlutfy:crm21447","ref":"crm21447","sha":"99a555a5a33a1bab313e224b6e277def664f83f0","user":{"login":"mlutfy","id":254741,"avatar_url":"https://avatars3.githubusercontent.com/u/254741?v=4","gravatar_id":"","url":"https://api.github.com/users/mlutfy","html_url":"https://github.com/mlutfy","followers_url":"https://api.github.com/users/mlutfy/followers","following_url":"https://api.github.com/users/mlutfy/following{/other_user}","gists_url":"https://api.github.com/users/mlutfy/gists{/gist_id}","starred_url":"https://api.github.com/users/mlutfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlutfy/subscriptions","organizations_url":"https://api.github.com/users/mlutfy/orgs","repos_url":"https://api.github.com/users/mlutfy/repos","events_url":"https://api.github.com/users/mlutfy/events{/privacy}","received_events_url":"https://api.github.com/users/mlutfy/received_events","type":"User","site_admin":false},"repo":{"id":8503089,"name":"civicrm-core","full_name":"mlutfy/civicrm-core","owner":{"login":"mlutfy","id":254741,"avatar_url":"https://avatars3.githubusercontent.com/u/254741?v=4","gravatar_id":"","url":"https://api.github.com/users/mlutfy","html_url":"https://github.com/mlutfy","followers_url":"https://api.github.com/users/mlutfy/followers","following_url":"https://api.github.com/users/mlutfy/following{/other_user}","gists_url":"https://api.github.com/users/mlutfy/gists{/gist_id}","starred_url":"https://api.github.com/users/mlutfy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlutfy/subscriptions","organizations_url":"https://api.github.com/users/mlutfy/orgs","repos_url":"https://api.github.com/users/mlutfy/repos","events_url":"https://api.github.com/users/mlutfy/events{/privacy}","received_events_url":"https://api.github.com/users/mlutfy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlutfy/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/mlutfy/civicrm-core","forks_url":"https://api.github.com/repos/mlutfy/civicrm-core/forks","keys_url":"https://api.github.com/repos/mlutfy/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlutfy/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlutfy/civicrm-core/teams","hooks_url":"https://api.github.com/repos/mlutfy/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/mlutfy/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/mlutfy/civicrm-core/events","assignees_url":"https://api.github.com/repos/mlutfy/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/mlutfy/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/mlutfy/civicrm-core/tags","blobs_url":"https://api.github.com/repos/mlutfy/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlutfy/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlutfy/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlutfy/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlutfy/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/mlutfy/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/mlutfy/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/mlutfy/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/mlutfy/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/mlutfy/civicrm-core/subscription","commits_url":"https://api.github.com/repos/mlutfy/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlutfy/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlutfy/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlutfy/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlutfy/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/mlutfy/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlutfy/civicrm-core/merges","archive_url":"https://api.github.com/repos/mlutfy/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlutfy/civicrm-core/downloads","issues_url":"https://api.github.com/repos/mlutfy/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/mlutfy/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/mlutfy/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/mlutfy/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlutfy/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/mlutfy/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/mlutfy/civicrm-core/deployments","created_at":"2013-03-01T14:35:49Z","updated_at":"2015-03-18T18:14:11Z","pushed_at":"2017-11-17T17:46:08Z","git_url":"git://github.com/mlutfy/civicrm-core.git","ssh_url":"git@github.com:mlutfy/civicrm-core.git","clone_url":"https://github.com/mlutfy/civicrm-core.git","svn_url":"https://github.com/mlutfy/civicrm-core","homepage":null,"size":149927,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"civicrm:master","ref":"master","sha":"f43cf3fa1d58c10e4d3ac05f14164e654db8eb37","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars2.githubusercontent.com/u/136373?v=4","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://avatars2.githubusercontent.com/u/136373?v=4","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}","deployments_url":"https://api.github.com/repos/civicrm/civicrm-core/deployments","created_at":"2013-03-01T06:11:56Z","updated_at":"2017-11-11T17:21:53Z","pushed_at":"2017-11-17T22:55:34Z","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":154896,"stargazers_count":236,"watchers_count":236,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":580,"mirror_url":null,"archived":false,"open_issues_count":214,"forks":580,"open_issues":214,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11293"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/11293"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/11293"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/11293/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/11293/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/11293/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/99a555a5a33a1bab313e224b6e277def664f83f0"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars2.githubusercontent.com/u/336308?v=4","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},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":6,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"eileenmcnaughton"}}