{"action":"opened","number":12437,"pull_request":{"url":"https://api.github.com/repos/modxcms/revolution/pulls/12437","id":35231549,"html_url":"https://github.com/modxcms/revolution/pull/12437","diff_url":"https://github.com/modxcms/revolution/pull/12437.diff","patch_url":"https://github.com/modxcms/revolution/pull/12437.patch","issue_url":"https://api.github.com/repos/modxcms/revolution/issues/12437","number":12437,"state":"open","locked":false,"title":"Take care of added records while counting the total number of widgets placed in a dashboard","user":{"login":"rtripault","id":300920,"avatar_url":"https://avatars.githubusercontent.com/u/300920?v=3","gravatar_id":"","url":"https://api.github.com/users/rtripault","html_url":"https://github.com/rtripault","followers_url":"https://api.github.com/users/rtripault/followers","following_url":"https://api.github.com/users/rtripault/following{/other_user}","gists_url":"https://api.github.com/users/rtripault/gists{/gist_id}","starred_url":"https://api.github.com/users/rtripault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtripault/subscriptions","organizations_url":"https://api.github.com/users/rtripault/orgs","repos_url":"https://api.github.com/users/rtripault/repos","events_url":"https://api.github.com/users/rtripault/events{/privacy}","received_events_url":"https://api.github.com/users/rtripault/received_events","type":"User","site_admin":false},"body":"### What does it do ?\r\n\r\nCalculate the real total of dashboard widgets (to \"mimic\" a rank/placement), instead of the total returned by the server.\r\n\r\n### Why is it needed ?\r\n\r\nWhen editing/placing widgets into a dashboard, `Ext.data.Store#getTotalCount()` was used. This method only takes care of \"cached\" records (as in not counting newly added records -- see the note at the end of description http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Store-method-getTotalCount).\r\n\r\nBasically, when editing a dashboard which only had 1 record, every records added/placed later (without save in between) would have a rank of `1`.\r\n\r\nMaking use of `store.data.length` appears to be more reliable.","created_at":"2015-05-12T14:24:58Z","updated_at":"2015-05-12T14:24:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae6e3ae87ede02ae6f6b69fe7c8240696d4e81d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/modxcms/revolution/pulls/12437/commits","review_comments_url":"https://api.github.com/repos/modxcms/revolution/pulls/12437/comments","review_comment_url":"https://api.github.com/repos/modxcms/revolution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/modxcms/revolution/issues/12437/comments","statuses_url":"https://api.github.com/repos/modxcms/revolution/statuses/903b4ed52755ac388d9a46a9a7e194349e9f1c0c","head":{"label":"rtripault:dashboard_widgets_placement_count","ref":"dashboard_widgets_placement_count","sha":"903b4ed52755ac388d9a46a9a7e194349e9f1c0c","user":{"login":"rtripault","id":300920,"avatar_url":"https://avatars.githubusercontent.com/u/300920?v=3","gravatar_id":"","url":"https://api.github.com/users/rtripault","html_url":"https://github.com/rtripault","followers_url":"https://api.github.com/users/rtripault/followers","following_url":"https://api.github.com/users/rtripault/following{/other_user}","gists_url":"https://api.github.com/users/rtripault/gists{/gist_id}","starred_url":"https://api.github.com/users/rtripault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtripault/subscriptions","organizations_url":"https://api.github.com/users/rtripault/orgs","repos_url":"https://api.github.com/users/rtripault/repos","events_url":"https://api.github.com/users/rtripault/events{/privacy}","received_events_url":"https://api.github.com/users/rtripault/received_events","type":"User","site_admin":false},"repo":{"id":1516226,"name":"revolution","full_name":"rtripault/revolution","owner":{"login":"rtripault","id":300920,"avatar_url":"https://avatars.githubusercontent.com/u/300920?v=3","gravatar_id":"","url":"https://api.github.com/users/rtripault","html_url":"https://github.com/rtripault","followers_url":"https://api.github.com/users/rtripault/followers","following_url":"https://api.github.com/users/rtripault/following{/other_user}","gists_url":"https://api.github.com/users/rtripault/gists{/gist_id}","starred_url":"https://api.github.com/users/rtripault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtripault/subscriptions","organizations_url":"https://api.github.com/users/rtripault/orgs","repos_url":"https://api.github.com/users/rtripault/repos","events_url":"https://api.github.com/users/rtripault/events{/privacy}","received_events_url":"https://api.github.com/users/rtripault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtripault/revolution","description":"MODx Revolution - Content Application Platform // French translation","fork":true,"url":"https://api.github.com/repos/rtripault/revolution","forks_url":"https://api.github.com/repos/rtripault/revolution/forks","keys_url":"https://api.github.com/repos/rtripault/revolution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtripault/revolution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtripault/revolution/teams","hooks_url":"https://api.github.com/repos/rtripault/revolution/hooks","issue_events_url":"https://api.github.com/repos/rtripault/revolution/issues/events{/number}","events_url":"https://api.github.com/repos/rtripault/revolution/events","assignees_url":"https://api.github.com/repos/rtripault/revolution/assignees{/user}","branches_url":"https://api.github.com/repos/rtripault/revolution/branches{/branch}","tags_url":"https://api.github.com/repos/rtripault/revolution/tags","blobs_url":"https://api.github.com/repos/rtripault/revolution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtripault/revolution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtripault/revolution/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtripault/revolution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtripault/revolution/statuses/{sha}","languages_url":"https://api.github.com/repos/rtripault/revolution/languages","stargazers_url":"https://api.github.com/repos/rtripault/revolution/stargazers","contributors_url":"https://api.github.com/repos/rtripault/revolution/contributors","subscribers_url":"https://api.github.com/repos/rtripault/revolution/subscribers","subscription_url":"https://api.github.com/repos/rtripault/revolution/subscription","commits_url":"https://api.github.com/repos/rtripault/revolution/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtripault/revolution/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtripault/revolution/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtripault/revolution/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtripault/revolution/contents/{+path}","compare_url":"https://api.github.com/repos/rtripault/revolution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtripault/revolution/merges","archive_url":"https://api.github.com/repos/rtripault/revolution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtripault/revolution/downloads","issues_url":"https://api.github.com/repos/rtripault/revolution/issues{/number}","pulls_url":"https://api.github.com/repos/rtripault/revolution/pulls{/number}","milestones_url":"https://api.github.com/repos/rtripault/revolution/milestones{/number}","notifications_url":"https://api.github.com/repos/rtripault/revolution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtripault/revolution/labels{/name}","releases_url":"https://api.github.com/repos/rtripault/revolution/releases{/id}","created_at":"2011-03-23T13:08:07Z","updated_at":"2015-01-14T14:53:44Z","pushed_at":"2015-05-12T14:24:11Z","git_url":"git://github.com/rtripault/revolution.git","ssh_url":"git@github.com:rtripault/revolution.git","clone_url":"https://github.com/rtripault/revolution.git","svn_url":"https://github.com/rtripault/revolution","homepage":"http://rtfm.modx.com/display/revolution","size":44744,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"modxcms:develop","ref":"develop","sha":"5599467faa155b0e2b17e9a20e9d9f7c38caf3b5","user":{"login":"modxcms","id":232723,"avatar_url":"https://avatars.githubusercontent.com/u/232723?v=3","gravatar_id":"","url":"https://api.github.com/users/modxcms","html_url":"https://github.com/modxcms","followers_url":"https://api.github.com/users/modxcms/followers","following_url":"https://api.github.com/users/modxcms/following{/other_user}","gists_url":"https://api.github.com/users/modxcms/gists{/gist_id}","starred_url":"https://api.github.com/users/modxcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modxcms/subscriptions","organizations_url":"https://api.github.com/users/modxcms/orgs","repos_url":"https://api.github.com/users/modxcms/repos","events_url":"https://api.github.com/users/modxcms/events{/privacy}","received_events_url":"https://api.github.com/users/modxcms/received_events","type":"Organization","site_admin":false},"repo":{"id":806201,"name":"revolution","full_name":"modxcms/revolution","owner":{"login":"modxcms","id":232723,"avatar_url":"https://avatars.githubusercontent.com/u/232723?v=3","gravatar_id":"","url":"https://api.github.com/users/modxcms","html_url":"https://github.com/modxcms","followers_url":"https://api.github.com/users/modxcms/followers","following_url":"https://api.github.com/users/modxcms/following{/other_user}","gists_url":"https://api.github.com/users/modxcms/gists{/gist_id}","starred_url":"https://api.github.com/users/modxcms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modxcms/subscriptions","organizations_url":"https://api.github.com/users/modxcms/orgs","repos_url":"https://api.github.com/users/modxcms/repos","events_url":"https://api.github.com/users/modxcms/events{/privacy}","received_events_url":"https://api.github.com/users/modxcms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/modxcms/revolution","description":"MODX Revolution - Content Application Platform","fork":false,"url":"https://api.github.com/repos/modxcms/revolution","forks_url":"https://api.github.com/repos/modxcms/revolution/forks","keys_url":"https://api.github.com/repos/modxcms/revolution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/modxcms/revolution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/modxcms/revolution/teams","hooks_url":"https://api.github.com/repos/modxcms/revolution/hooks","issue_events_url":"https://api.github.com/repos/modxcms/revolution/issues/events{/number}","events_url":"https://api.github.com/repos/modxcms/revolution/events","assignees_url":"https://api.github.com/repos/modxcms/revolution/assignees{/user}","branches_url":"https://api.github.com/repos/modxcms/revolution/branches{/branch}","tags_url":"https://api.github.com/repos/modxcms/revolution/tags","blobs_url":"https://api.github.com/repos/modxcms/revolution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/modxcms/revolution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/modxcms/revolution/git/refs{/sha}","trees_url":"https://api.github.com/repos/modxcms/revolution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/modxcms/revolution/statuses/{sha}","languages_url":"https://api.github.com/repos/modxcms/revolution/languages","stargazers_url":"https://api.github.com/repos/modxcms/revolution/stargazers","contributors_url":"https://api.github.com/repos/modxcms/revolution/contributors","subscribers_url":"https://api.github.com/repos/modxcms/revolution/subscribers","subscription_url":"https://api.github.com/repos/modxcms/revolution/subscription","commits_url":"https://api.github.com/repos/modxcms/revolution/commits{/sha}","git_commits_url":"https://api.github.com/repos/modxcms/revolution/git/commits{/sha}","comments_url":"https://api.github.com/repos/modxcms/revolution/comments{/number}","issue_comment_url":"https://api.github.com/repos/modxcms/revolution/issues/comments{/number}","contents_url":"https://api.github.com/repos/modxcms/revolution/contents/{+path}","compare_url":"https://api.github.com/repos/modxcms/revolution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/modxcms/revolution/merges","archive_url":"https://api.github.com/repos/modxcms/revolution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/modxcms/revolution/downloads","issues_url":"https://api.github.com/repos/modxcms/revolution/issues{/number}","pulls_url":"https://api.github.com/repos/modxcms/revolution/pulls{/number}","milestones_url":"https://api.github.com/repos/modxcms/revolution/milestones{/number}","notifications_url":"https://api.github.com/repos/modxcms/revolution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/modxcms/revolution/labels{/name}","releases_url":"https://api.github.com/repos/modxcms/revolution/releases{/id}","created_at":"2010-07-29T21:03:57Z","updated_at":"2015-05-04T21:14:04Z","pushed_at":"2015-05-12T14:24:58Z","git_url":"git://github.com/modxcms/revolution.git","ssh_url":"git@github.com:modxcms/revolution.git","clone_url":"https://github.com/modxcms/revolution.git","svn_url":"https://github.com/modxcms/revolution","homepage":"http://rtfm.modx.com/revolution/2.x/","size":76626,"stargazers_count":680,"watchers_count":680,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":344,"mirror_url":null,"open_issues_count":991,"forks":344,"open_issues":991,"watchers":680,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/modxcms/revolution/pulls/12437"},"html":{"href":"https://github.com/modxcms/revolution/pull/12437"},"issue":{"href":"https://api.github.com/repos/modxcms/revolution/issues/12437"},"comments":{"href":"https://api.github.com/repos/modxcms/revolution/issues/12437/comments"},"review_comments":{"href":"https://api.github.com/repos/modxcms/revolution/pulls/12437/comments"},"review_comment":{"href":"https://api.github.com/repos/modxcms/revolution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/modxcms/revolution/pulls/12437/commits"},"statuses":{"href":"https://api.github.com/repos/modxcms/revolution/statuses/903b4ed52755ac388d9a46a9a7e194349e9f1c0c"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}