{"action":"created","comment":{"url":"https://api.github.com/repos/envato/double_entry/pulls/comments/48797357","id":48797357,"diff_hunk":"@@ -50,8 +53,9 @@ def retrieve_aggregates\n         scope = LineAggregate.\n                 where(:function => function).\n                 where(:range_type => 'normal').\n-                where(:account => account.to_s).\n-                where(:code => code.to_s).\n+                where(:account => account.try(:to_s)).\n+                where(:code => code.try(:to_s)).\n+                where(:partner_account => partner_account.try(:to_s)).","path":"lib/double_entry/reporting/aggregate_array.rb","position":48,"original_position":48,"commit_id":"536d6faa9bff6b65b8c92e782844f62869afaa34","original_commit_id":"536d6faa9bff6b65b8c92e782844f62869afaa34","user":{"login":"macosgrove","id":1095688,"avatar_url":"https://avatars.githubusercontent.com/u/1095688?v=3","gravatar_id":"","url":"https://api.github.com/users/macosgrove","html_url":"https://github.com/macosgrove","followers_url":"https://api.github.com/users/macosgrove/followers","following_url":"https://api.github.com/users/macosgrove/following{/other_user}","gists_url":"https://api.github.com/users/macosgrove/gists{/gist_id}","starred_url":"https://api.github.com/users/macosgrove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macosgrove/subscriptions","organizations_url":"https://api.github.com/users/macosgrove/orgs","repos_url":"https://api.github.com/users/macosgrove/repos","events_url":"https://api.github.com/users/macosgrove/events{/privacy}","received_events_url":"https://api.github.com/users/macosgrove/received_events","type":"User","site_admin":false},"body":"Erm, wouldn't that be a HUGE change not a _slight_ change in behaviour?","created_at":"2016-01-04T23:43:13Z","updated_at":"2016-01-04T23:43:13Z","html_url":"https://github.com/envato/double_entry/pull/108#discussion_r48797357","pull_request_url":"https://api.github.com/repos/envato/double_entry/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/envato/double_entry/pulls/comments/48797357"},"html":{"href":"https://github.com/envato/double_entry/pull/108#discussion_r48797357"},"pull_request":{"href":"https://api.github.com/repos/envato/double_entry/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/envato/double_entry/pulls/108","id":54945412,"html_url":"https://github.com/envato/double_entry/pull/108","diff_url":"https://github.com/envato/double_entry/pull/108.diff","patch_url":"https://github.com/envato/double_entry/pull/108.patch","issue_url":"https://api.github.com/repos/envato/double_entry/issues/108","number":108,"state":"open","locked":false,"title":"Allow partner_account to be specified for aggregates","user":{"login":"stephnacios","id":3640651,"avatar_url":"https://avatars.githubusercontent.com/u/3640651?v=3","gravatar_id":"","url":"https://api.github.com/users/stephnacios","html_url":"https://github.com/stephnacios","followers_url":"https://api.github.com/users/stephnacios/followers","following_url":"https://api.github.com/users/stephnacios/following{/other_user}","gists_url":"https://api.github.com/users/stephnacios/gists{/gist_id}","starred_url":"https://api.github.com/users/stephnacios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephnacios/subscriptions","organizations_url":"https://api.github.com/users/stephnacios/orgs","repos_url":"https://api.github.com/users/stephnacios/repos","events_url":"https://api.github.com/users/stephnacios/events{/privacy}","received_events_url":"https://api.github.com/users/stephnacios/received_events","type":"User","site_admin":false},"body":"Allow aggregations by partner_account to support reporting on the receiving account of transfers\r\n\r\nFor cases where you transfer from the same account using the same transfer code into different partner accounts, but want to report on the specific account/partner_account transfers.\r\n\r\nAlso introduced some keyword arguments to the aggregate API - these shouldn't affect existing calls as they just replace the options hash but do prevent the use of the double_entry gem with ruby < 2.0 (see https://github.com/envato/double_entry/pull/107 for removing ruby 1.9.3 support).  Note the build should go green once we've merged in #107, as the only tests failing are in the ruby 1.9.3 run.\r\n\r\nPaired with @salamagd ","created_at":"2016-01-04T05:56:08Z","updated_at":"2016-01-04T23:43:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0408ee95c700bb6ab22b02a36c4a32f8e917661c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/envato/double_entry/pulls/108/commits","review_comments_url":"https://api.github.com/repos/envato/double_entry/pulls/108/comments","review_comment_url":"https://api.github.com/repos/envato/double_entry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envato/double_entry/issues/108/comments","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/536d6faa9bff6b65b8c92e782844f62869afaa34","head":{"label":"envato:allow_partner_account_in_aggregate","ref":"allow_partner_account_in_aggregate","sha":"536d6faa9bff6b65b8c92e782844f62869afaa34","user":{"login":"envato","id":14786,"avatar_url":"https://avatars.githubusercontent.com/u/14786?v=3","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"repo":{"id":20909885,"name":"double_entry","full_name":"envato/double_entry","owner":{"login":"envato","id":14786,"avatar_url":"https://avatars.githubusercontent.com/u/14786?v=3","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/envato/double_entry","description":"","fork":false,"url":"https://api.github.com/repos/envato/double_entry","forks_url":"https://api.github.com/repos/envato/double_entry/forks","keys_url":"https://api.github.com/repos/envato/double_entry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envato/double_entry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envato/double_entry/teams","hooks_url":"https://api.github.com/repos/envato/double_entry/hooks","issue_events_url":"https://api.github.com/repos/envato/double_entry/issues/events{/number}","events_url":"https://api.github.com/repos/envato/double_entry/events","assignees_url":"https://api.github.com/repos/envato/double_entry/assignees{/user}","branches_url":"https://api.github.com/repos/envato/double_entry/branches{/branch}","tags_url":"https://api.github.com/repos/envato/double_entry/tags","blobs_url":"https://api.github.com/repos/envato/double_entry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envato/double_entry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envato/double_entry/git/refs{/sha}","trees_url":"https://api.github.com/repos/envato/double_entry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/{sha}","languages_url":"https://api.github.com/repos/envato/double_entry/languages","stargazers_url":"https://api.github.com/repos/envato/double_entry/stargazers","contributors_url":"https://api.github.com/repos/envato/double_entry/contributors","subscribers_url":"https://api.github.com/repos/envato/double_entry/subscribers","subscription_url":"https://api.github.com/repos/envato/double_entry/subscription","commits_url":"https://api.github.com/repos/envato/double_entry/commits{/sha}","git_commits_url":"https://api.github.com/repos/envato/double_entry/git/commits{/sha}","comments_url":"https://api.github.com/repos/envato/double_entry/comments{/number}","issue_comment_url":"https://api.github.com/repos/envato/double_entry/issues/comments{/number}","contents_url":"https://api.github.com/repos/envato/double_entry/contents/{+path}","compare_url":"https://api.github.com/repos/envato/double_entry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envato/double_entry/merges","archive_url":"https://api.github.com/repos/envato/double_entry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envato/double_entry/downloads","issues_url":"https://api.github.com/repos/envato/double_entry/issues{/number}","pulls_url":"https://api.github.com/repos/envato/double_entry/pulls{/number}","milestones_url":"https://api.github.com/repos/envato/double_entry/milestones{/number}","notifications_url":"https://api.github.com/repos/envato/double_entry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envato/double_entry/labels{/name}","releases_url":"https://api.github.com/repos/envato/double_entry/releases{/id}","created_at":"2014-06-17T04:10:25Z","updated_at":"2015-11-30T16:09:56Z","pushed_at":"2016-01-04T22:38:14Z","git_url":"git://github.com/envato/double_entry.git","ssh_url":"git@github.com:envato/double_entry.git","clone_url":"https://github.com/envato/double_entry.git","svn_url":"https://github.com/envato/double_entry","homepage":null,"size":478,"stargazers_count":61,"watchers_count":61,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":61,"default_branch":"master"}},"base":{"label":"envato:master","ref":"master","sha":"8bb138ba197deb1f7176e472ecf327a8b84f57d5","user":{"login":"envato","id":14786,"avatar_url":"https://avatars.githubusercontent.com/u/14786?v=3","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"repo":{"id":20909885,"name":"double_entry","full_name":"envato/double_entry","owner":{"login":"envato","id":14786,"avatar_url":"https://avatars.githubusercontent.com/u/14786?v=3","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/envato/double_entry","description":"","fork":false,"url":"https://api.github.com/repos/envato/double_entry","forks_url":"https://api.github.com/repos/envato/double_entry/forks","keys_url":"https://api.github.com/repos/envato/double_entry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envato/double_entry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envato/double_entry/teams","hooks_url":"https://api.github.com/repos/envato/double_entry/hooks","issue_events_url":"https://api.github.com/repos/envato/double_entry/issues/events{/number}","events_url":"https://api.github.com/repos/envato/double_entry/events","assignees_url":"https://api.github.com/repos/envato/double_entry/assignees{/user}","branches_url":"https://api.github.com/repos/envato/double_entry/branches{/branch}","tags_url":"https://api.github.com/repos/envato/double_entry/tags","blobs_url":"https://api.github.com/repos/envato/double_entry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envato/double_entry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envato/double_entry/git/refs{/sha}","trees_url":"https://api.github.com/repos/envato/double_entry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/{sha}","languages_url":"https://api.github.com/repos/envato/double_entry/languages","stargazers_url":"https://api.github.com/repos/envato/double_entry/stargazers","contributors_url":"https://api.github.com/repos/envato/double_entry/contributors","subscribers_url":"https://api.github.com/repos/envato/double_entry/subscribers","subscription_url":"https://api.github.com/repos/envato/double_entry/subscription","commits_url":"https://api.github.com/repos/envato/double_entry/commits{/sha}","git_commits_url":"https://api.github.com/repos/envato/double_entry/git/commits{/sha}","comments_url":"https://api.github.com/repos/envato/double_entry/comments{/number}","issue_comment_url":"https://api.github.com/repos/envato/double_entry/issues/comments{/number}","contents_url":"https://api.github.com/repos/envato/double_entry/contents/{+path}","compare_url":"https://api.github.com/repos/envato/double_entry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envato/double_entry/merges","archive_url":"https://api.github.com/repos/envato/double_entry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envato/double_entry/downloads","issues_url":"https://api.github.com/repos/envato/double_entry/issues{/number}","pulls_url":"https://api.github.com/repos/envato/double_entry/pulls{/number}","milestones_url":"https://api.github.com/repos/envato/double_entry/milestones{/number}","notifications_url":"https://api.github.com/repos/envato/double_entry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envato/double_entry/labels{/name}","releases_url":"https://api.github.com/repos/envato/double_entry/releases{/id}","created_at":"2014-06-17T04:10:25Z","updated_at":"2015-11-30T16:09:56Z","pushed_at":"2016-01-04T22:38:14Z","git_url":"git://github.com/envato/double_entry.git","ssh_url":"git@github.com:envato/double_entry.git","clone_url":"https://github.com/envato/double_entry.git","svn_url":"https://github.com/envato/double_entry","homepage":null,"size":478,"stargazers_count":61,"watchers_count":61,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":5,"forks":7,"open_issues":5,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envato/double_entry/pulls/108"},"html":{"href":"https://github.com/envato/double_entry/pull/108"},"issue":{"href":"https://api.github.com/repos/envato/double_entry/issues/108"},"comments":{"href":"https://api.github.com/repos/envato/double_entry/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/envato/double_entry/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/envato/double_entry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envato/double_entry/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/envato/double_entry/statuses/536d6faa9bff6b65b8c92e782844f62869afaa34"}}}}