{"action":"created","comment":{"url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/comments/38513884","id":38513884,"diff_hunk":"@@ -176,24 +175,27 @@ def types\n   end\n \n   def open_work_packages_by_type\n-    @open_work_packages_by_tracker ||= WorkPackage.visible.count(:group => :type,\n-                                                          :include => [:project, :status, :type],\n-                                                          :conditions => [\"(#{subproject_condition}) AND #{Status.table_name}.is_closed=?\", false])\n+    @open_work_packages_by_tracker ||= WorkPackage.visible\n+                                       .group(:type)\n+                                       .includes([:project, :status, :type])\n+                                       .where([\"(#{subproject_condition}) AND #{Status.table_name}.is_closed=?\", false])\n+                                       .count","path":"app/controllers/my_projects_overviews_controller.rb","position":30,"original_position":30,"commit_id":"1a4635b8cb7108e7e84f2d10d80c15d7d15b4bda","original_commit_id":"c31caa5ebad1d17c31cb5e51e62ac2132f286533","user":{"login":"ulferts","id":617519,"avatar_url":"https://avatars.githubusercontent.com/u/617519?v=3","gravatar_id":"","url":"https://api.github.com/users/ulferts","html_url":"https://github.com/ulferts","followers_url":"https://api.github.com/users/ulferts/followers","following_url":"https://api.github.com/users/ulferts/following{/other_user}","gists_url":"https://api.github.com/users/ulferts/gists{/gist_id}","starred_url":"https://api.github.com/users/ulferts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulferts/subscriptions","organizations_url":"https://api.github.com/users/ulferts/orgs","repos_url":"https://api.github.com/users/ulferts/repos","events_url":"https://api.github.com/users/ulferts/events{/privacy}","received_events_url":"https://api.github.com/users/ulferts/received_events","type":"User","site_admin":false},"body":"What hound says","created_at":"2015-09-02T09:37:04Z","updated_at":"2015-09-02T09:37:04Z","html_url":"https://github.com/finnlabs/openproject-my_project_page/pull/55#discussion_r38513884","pull_request_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/comments/38513884"},"html":{"href":"https://github.com/finnlabs/openproject-my_project_page/pull/55#discussion_r38513884"},"pull_request":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55","id":42900767,"html_url":"https://github.com/finnlabs/openproject-my_project_page/pull/55","diff_url":"https://github.com/finnlabs/openproject-my_project_page/pull/55.diff","patch_url":"https://github.com/finnlabs/openproject-my_project_page/pull/55.patch","issue_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/55","number":55,"state":"open","locked":false,"title":"[20043] Upgrade to Rails 4.1.x","user":{"login":"myabc","id":755,"avatar_url":"https://avatars.githubusercontent.com/u/755?v=3","gravatar_id":"","url":"https://api.github.com/users/myabc","html_url":"https://github.com/myabc","followers_url":"https://api.github.com/users/myabc/followers","following_url":"https://api.github.com/users/myabc/following{/other_user}","gists_url":"https://api.github.com/users/myabc/gists{/gist_id}","starred_url":"https://api.github.com/users/myabc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myabc/subscriptions","organizations_url":"https://api.github.com/users/myabc/orgs","repos_url":"https://api.github.com/users/myabc/repos","events_url":"https://api.github.com/users/myabc/events{/privacy}","received_events_url":"https://api.github.com/users/myabc/received_events","type":"User","site_admin":false},"body":":warning: **Please review, merge opf/openproject#3382 first.**\n\nhttps://community.openproject.org/work_packages/20043","created_at":"2015-08-20T07:50:18Z","updated_at":"2015-09-02T09:37:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d5b58307e6d4afbbdb5dbb92d8cd6f1a93d6542","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55/commits","review_comments_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55/comments","review_comment_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/comments{/number}","comments_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/55/comments","statuses_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/statuses/1a4635b8cb7108e7e84f2d10d80c15d7d15b4bda","head":{"label":"finnlabs:feature/20043-rails-4.1","ref":"feature/20043-rails-4.1","sha":"1a4635b8cb7108e7e84f2d10d80c15d7d15b4bda","user":{"login":"finnlabs","id":86719,"avatar_url":"https://avatars.githubusercontent.com/u/86719?v=3","gravatar_id":"","url":"https://api.github.com/users/finnlabs","html_url":"https://github.com/finnlabs","followers_url":"https://api.github.com/users/finnlabs/followers","following_url":"https://api.github.com/users/finnlabs/following{/other_user}","gists_url":"https://api.github.com/users/finnlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/finnlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnlabs/subscriptions","organizations_url":"https://api.github.com/users/finnlabs/orgs","repos_url":"https://api.github.com/users/finnlabs/repos","events_url":"https://api.github.com/users/finnlabs/events{/privacy}","received_events_url":"https://api.github.com/users/finnlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2755781,"name":"openproject-my_project_page","full_name":"finnlabs/openproject-my_project_page","owner":{"login":"finnlabs","id":86719,"avatar_url":"https://avatars.githubusercontent.com/u/86719?v=3","gravatar_id":"","url":"https://api.github.com/users/finnlabs","html_url":"https://github.com/finnlabs","followers_url":"https://api.github.com/users/finnlabs/followers","following_url":"https://api.github.com/users/finnlabs/following{/other_user}","gists_url":"https://api.github.com/users/finnlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/finnlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnlabs/subscriptions","organizations_url":"https://api.github.com/users/finnlabs/orgs","repos_url":"https://api.github.com/users/finnlabs/repos","events_url":"https://api.github.com/users/finnlabs/events{/privacy}","received_events_url":"https://api.github.com/users/finnlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/finnlabs/openproject-my_project_page","description":"The \"My Page\". For the project overview.","fork":false,"url":"https://api.github.com/repos/finnlabs/openproject-my_project_page","forks_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/forks","keys_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/keys{/key_id}","collaborators_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/teams","hooks_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/hooks","issue_events_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/events{/number}","events_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/events","assignees_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/assignees{/user}","branches_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/branches{/branch}","tags_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/tags","blobs_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/refs{/sha}","trees_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/trees{/sha}","statuses_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/statuses/{sha}","languages_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/languages","stargazers_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/stargazers","contributors_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/contributors","subscribers_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/subscribers","subscription_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/subscription","commits_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/commits{/sha}","git_commits_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/commits{/sha}","comments_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/comments{/number}","issue_comment_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/comments{/number}","contents_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/contents/{+path}","compare_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/compare/{base}...{head}","merges_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/merges","archive_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/downloads","issues_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues{/number}","pulls_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls{/number}","milestones_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/milestones{/number}","notifications_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/labels{/name}","releases_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/releases{/id}","created_at":"2011-11-11T12:58:01Z","updated_at":"2015-05-04T21:08:37Z","pushed_at":"2015-08-30T10:31:15Z","git_url":"git://github.com/finnlabs/openproject-my_project_page.git","ssh_url":"git@github.com:finnlabs/openproject-my_project_page.git","clone_url":"https://github.com/finnlabs/openproject-my_project_page.git","svn_url":"https://github.com/finnlabs/openproject-my_project_page","homepage":"","size":1600,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":4,"default_branch":"dev"}},"base":{"label":"finnlabs:dev","ref":"dev","sha":"d42f0196c93f05e87d37005a3dff0184d8b9b0a9","user":{"login":"finnlabs","id":86719,"avatar_url":"https://avatars.githubusercontent.com/u/86719?v=3","gravatar_id":"","url":"https://api.github.com/users/finnlabs","html_url":"https://github.com/finnlabs","followers_url":"https://api.github.com/users/finnlabs/followers","following_url":"https://api.github.com/users/finnlabs/following{/other_user}","gists_url":"https://api.github.com/users/finnlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/finnlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnlabs/subscriptions","organizations_url":"https://api.github.com/users/finnlabs/orgs","repos_url":"https://api.github.com/users/finnlabs/repos","events_url":"https://api.github.com/users/finnlabs/events{/privacy}","received_events_url":"https://api.github.com/users/finnlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2755781,"name":"openproject-my_project_page","full_name":"finnlabs/openproject-my_project_page","owner":{"login":"finnlabs","id":86719,"avatar_url":"https://avatars.githubusercontent.com/u/86719?v=3","gravatar_id":"","url":"https://api.github.com/users/finnlabs","html_url":"https://github.com/finnlabs","followers_url":"https://api.github.com/users/finnlabs/followers","following_url":"https://api.github.com/users/finnlabs/following{/other_user}","gists_url":"https://api.github.com/users/finnlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/finnlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finnlabs/subscriptions","organizations_url":"https://api.github.com/users/finnlabs/orgs","repos_url":"https://api.github.com/users/finnlabs/repos","events_url":"https://api.github.com/users/finnlabs/events{/privacy}","received_events_url":"https://api.github.com/users/finnlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/finnlabs/openproject-my_project_page","description":"The \"My Page\". For the project overview.","fork":false,"url":"https://api.github.com/repos/finnlabs/openproject-my_project_page","forks_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/forks","keys_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/keys{/key_id}","collaborators_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/teams","hooks_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/hooks","issue_events_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/events{/number}","events_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/events","assignees_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/assignees{/user}","branches_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/branches{/branch}","tags_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/tags","blobs_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/refs{/sha}","trees_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/trees{/sha}","statuses_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/statuses/{sha}","languages_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/languages","stargazers_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/stargazers","contributors_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/contributors","subscribers_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/subscribers","subscription_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/subscription","commits_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/commits{/sha}","git_commits_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/git/commits{/sha}","comments_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/comments{/number}","issue_comment_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/comments{/number}","contents_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/contents/{+path}","compare_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/compare/{base}...{head}","merges_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/merges","archive_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/downloads","issues_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues{/number}","pulls_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls{/number}","milestones_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/milestones{/number}","notifications_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/labels{/name}","releases_url":"https://api.github.com/repos/finnlabs/openproject-my_project_page/releases{/id}","created_at":"2011-11-11T12:58:01Z","updated_at":"2015-05-04T21:08:37Z","pushed_at":"2015-08-30T10:31:15Z","git_url":"git://github.com/finnlabs/openproject-my_project_page.git","ssh_url":"git@github.com:finnlabs/openproject-my_project_page.git","clone_url":"https://github.com/finnlabs/openproject-my_project_page.git","svn_url":"https://github.com/finnlabs/openproject-my_project_page","homepage":"","size":1600,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":4,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55"},"html":{"href":"https://github.com/finnlabs/openproject-my_project_page/pull/55"},"issue":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/55"},"comments":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/finnlabs/openproject-my_project_page/statuses/1a4635b8cb7108e7e84f2d10d80c15d7d15b4bda"}}}}