{"action":"created","comment":{"url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/comments/267571441","pull_request_review_id":217013608,"id":267571441,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI2NzU3MTQ0MQ==","diff_hunk":"@@ -656,7 +688,13 @@ protected function reorderItems($list, array $values, array $sortedIDs)\n                 $record = $currentSortList[$targetRecordID];\n                 if ($record->$sortField != $newSortValue) {\n                     $record->$sortField = $newSortValue;\n-                    $record->write();\n+\n+                    if ($this->getRepublishLiveRecords() && $record->isLiveVersion()) {\n+                        $record->write();\n+                        $record->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE, true);\n+                    } else {\n+                        $record->write();\n+                    }","path":"src/GridFieldOrderableRows.php","position":59,"original_position":59,"commit_id":"d45f80c0cdbcf35198cbc9a65b975f4567df2849","original_commit_id":"fdd0e61ab1389fad2aa4dece288bfb69092314db","user":{"login":"micmania1","id":881537,"node_id":"MDQ6VXNlcjg4MTUzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/881537?v=4","gravatar_id":"","url":"https://api.github.com/users/micmania1","html_url":"https://github.com/micmania1","followers_url":"https://api.github.com/users/micmania1/followers","following_url":"https://api.github.com/users/micmania1/following{/other_user}","gists_url":"https://api.github.com/users/micmania1/gists{/gist_id}","starred_url":"https://api.github.com/users/micmania1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micmania1/subscriptions","organizations_url":"https://api.github.com/users/micmania1/orgs","repos_url":"https://api.github.com/users/micmania1/repos","events_url":"https://api.github.com/users/micmania1/events{/privacy}","received_events_url":"https://api.github.com/users/micmania1/received_events","type":"User","site_admin":false},"body":"It only writes once? I can't write before the check since then the check for `isLiveVersion()` would fail.","created_at":"2019-03-20T22:26:20Z","updated_at":"2019-03-20T22:26:20Z","html_url":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289#discussion_r267571441","pull_request_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/comments/267571441"},"html":{"href":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289#discussion_r267571441"},"pull_request":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289"}},"in_reply_to_id":267570720},"pull_request":{"url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289","id":263058380,"node_id":"MDExOlB1bGxSZXF1ZXN0MjYzMDU4Mzgw","html_url":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289","diff_url":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289.diff","patch_url":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289.patch","issue_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/289","number":289,"state":"open","locked":false,"title":"NEW added the ability to autopublish items that are already live","user":{"login":"micmania1","id":881537,"node_id":"MDQ6VXNlcjg4MTUzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/881537?v=4","gravatar_id":"","url":"https://api.github.com/users/micmania1","html_url":"https://github.com/micmania1","followers_url":"https://api.github.com/users/micmania1/followers","following_url":"https://api.github.com/users/micmania1/following{/other_user}","gists_url":"https://api.github.com/users/micmania1/gists{/gist_id}","starred_url":"https://api.github.com/users/micmania1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micmania1/subscriptions","organizations_url":"https://api.github.com/users/micmania1/orgs","repos_url":"https://api.github.com/users/micmania1/repos","events_url":"https://api.github.com/users/micmania1/events{/privacy}","received_events_url":"https://api.github.com/users/micmania1/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-03-20T22:19:09Z","updated_at":"2019-03-20T22:26:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ed4213e7a3c7f904b592ae8ded9a252e96488e4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289/commits","review_comments_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289/comments","review_comment_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/289/comments","statuses_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/statuses/d45f80c0cdbcf35198cbc9a65b975f4567df2849","head":{"label":"silverstripe-superchargers:feature/republish-live-records","ref":"feature/republish-live-records","sha":"d45f80c0cdbcf35198cbc9a65b975f4567df2849","user":{"login":"silverstripe-superchargers","id":44147548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTQ3NTQ4","avatar_url":"https://avatars2.githubusercontent.com/u/44147548?v=4","gravatar_id":"","url":"https://api.github.com/users/silverstripe-superchargers","html_url":"https://github.com/silverstripe-superchargers","followers_url":"https://api.github.com/users/silverstripe-superchargers/followers","following_url":"https://api.github.com/users/silverstripe-superchargers/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-superchargers/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-superchargers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-superchargers/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-superchargers/orgs","repos_url":"https://api.github.com/users/silverstripe-superchargers/repos","events_url":"https://api.github.com/users/silverstripe-superchargers/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-superchargers/received_events","type":"Organization","site_admin":false},"repo":{"id":176824330,"node_id":"MDEwOlJlcG9zaXRvcnkxNzY4MjQzMzA=","name":"silverstripe-gridfieldextensions","full_name":"silverstripe-superchargers/silverstripe-gridfieldextensions","private":false,"owner":{"login":"silverstripe-superchargers","id":44147548,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ0MTQ3NTQ4","avatar_url":"https://avatars2.githubusercontent.com/u/44147548?v=4","gravatar_id":"","url":"https://api.github.com/users/silverstripe-superchargers","html_url":"https://github.com/silverstripe-superchargers","followers_url":"https://api.github.com/users/silverstripe-superchargers/followers","following_url":"https://api.github.com/users/silverstripe-superchargers/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe-superchargers/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe-superchargers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe-superchargers/subscriptions","organizations_url":"https://api.github.com/users/silverstripe-superchargers/orgs","repos_url":"https://api.github.com/users/silverstripe-superchargers/repos","events_url":"https://api.github.com/users/silverstripe-superchargers/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe-superchargers/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/silverstripe-superchargers/silverstripe-gridfieldextensions","description":"A collection of useful grid field components.","fork":true,"url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions","forks_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/forks","keys_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/teams","hooks_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/hooks","issue_events_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/events","assignees_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/tags","blobs_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/languages","stargazers_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/stargazers","contributors_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/contributors","subscribers_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/subscribers","subscription_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/subscription","commits_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/merges","archive_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/downloads","issues_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe-superchargers/silverstripe-gridfieldextensions/deployments","created_at":"2019-03-20T22:05:44Z","updated_at":"2019-03-20T22:05:46Z","pushed_at":"2019-03-20T22:24:07Z","git_url":"git://github.com/silverstripe-superchargers/silverstripe-gridfieldextensions.git","ssh_url":"git@github.com:silverstripe-superchargers/silverstripe-gridfieldextensions.git","clone_url":"https://github.com/silverstripe-superchargers/silverstripe-gridfieldextensions.git","svn_url":"https://github.com/silverstripe-superchargers/silverstripe-gridfieldextensions","homepage":null,"size":452,"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,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"symbiote:master","ref":"master","sha":"33a87686ba8c6975ef38f6d229b579a915750499","user":{"login":"symbiote","id":23506857,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTA2ODU3","avatar_url":"https://avatars1.githubusercontent.com/u/23506857?v=4","gravatar_id":"","url":"https://api.github.com/users/symbiote","html_url":"https://github.com/symbiote","followers_url":"https://api.github.com/users/symbiote/followers","following_url":"https://api.github.com/users/symbiote/following{/other_user}","gists_url":"https://api.github.com/users/symbiote/gists{/gist_id}","starred_url":"https://api.github.com/users/symbiote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symbiote/subscriptions","organizations_url":"https://api.github.com/users/symbiote/orgs","repos_url":"https://api.github.com/users/symbiote/repos","events_url":"https://api.github.com/users/symbiote/events{/privacy}","received_events_url":"https://api.github.com/users/symbiote/received_events","type":"Organization","site_admin":false},"repo":{"id":7373726,"node_id":"MDEwOlJlcG9zaXRvcnk3MzczNzI2","name":"silverstripe-gridfieldextensions","full_name":"symbiote/silverstripe-gridfieldextensions","private":false,"owner":{"login":"symbiote","id":23506857,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTA2ODU3","avatar_url":"https://avatars1.githubusercontent.com/u/23506857?v=4","gravatar_id":"","url":"https://api.github.com/users/symbiote","html_url":"https://github.com/symbiote","followers_url":"https://api.github.com/users/symbiote/followers","following_url":"https://api.github.com/users/symbiote/following{/other_user}","gists_url":"https://api.github.com/users/symbiote/gists{/gist_id}","starred_url":"https://api.github.com/users/symbiote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symbiote/subscriptions","organizations_url":"https://api.github.com/users/symbiote/orgs","repos_url":"https://api.github.com/users/symbiote/repos","events_url":"https://api.github.com/users/symbiote/events{/privacy}","received_events_url":"https://api.github.com/users/symbiote/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/symbiote/silverstripe-gridfieldextensions","description":"A collection of useful grid field components.","fork":false,"url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions","forks_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/forks","keys_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/teams","hooks_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/hooks","issue_events_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/events{/number}","events_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/events","assignees_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/assignees{/user}","branches_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/branches{/branch}","tags_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/tags","blobs_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/git/refs{/sha}","trees_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/statuses/{sha}","languages_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/languages","stargazers_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/stargazers","contributors_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/contributors","subscribers_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/subscribers","subscription_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/subscription","commits_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/commits{/sha}","git_commits_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/git/commits{/sha}","comments_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/comments{/number}","issue_comment_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/comments{/number}","contents_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/contents/{+path}","compare_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/merges","archive_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/downloads","issues_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues{/number}","pulls_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls{/number}","milestones_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/milestones{/number}","notifications_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/labels{/name}","releases_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/releases{/id}","deployments_url":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/deployments","created_at":"2012-12-30T05:12:37Z","updated_at":"2019-03-01T02:46:01Z","pushed_at":"2019-03-20T22:24:08Z","git_url":"git://github.com/symbiote/silverstripe-gridfieldextensions.git","ssh_url":"git@github.com:symbiote/silverstripe-gridfieldextensions.git","clone_url":"https://github.com/symbiote/silverstripe-gridfieldextensions.git","svn_url":"https://github.com/symbiote/silverstripe-gridfieldextensions","homepage":null,"size":452,"stargazers_count":86,"watchers_count":86,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":98,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":98,"open_issues":34,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289"},"html":{"href":"https://github.com/symbiote/silverstripe-gridfieldextensions/pull/289"},"issue":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/289"},"comments":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/symbiote/silverstripe-gridfieldextensions/statuses/d45f80c0cdbcf35198cbc9a65b975f4567df2849"}},"author_association":"NONE"}}
{"actor":{"display_login":"micmania1"}}