{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/comments/126939649","pull_request_review_id":49472712,"id":126939649,"diff_hunk":"@@ -83,6 +85,26 @@ public function actionsAction(\n         return $this->reloadTab('locations', $content->id, $redirectLocationId);\n     }\n \n+    public function swapLocationAction(\n+        Content $content,\n+        Location $location,\n+        Request $request\n+    ) {\n+        $swapLocationsForm = $this->formFactory->createLocationsContentSwapForm();\n+        $swapLocationsForm->handleRequest($request);\n+\n+        if ($swapLocationsForm->isValid()) {\n+            $newLocationId = $swapLocationsForm->get('new_location_id')->getData();\n+            $this->uiLocationService->swapLocations($location, $newLocationId);\n+\n+            return $this->resetLocation($content->id);\n+        }\n+\n+        $redirectLocationId = $request->query->get('redirectLocationId', $content->contentInfo->mainLocationId);\n+\n+        return $this->reloadTab('locations', $content->id, $redirectLocationId);","path":"src/bundle/Controller/LocationController.php","position":34,"original_position":34,"commit_id":"f16cb0ffdbd8c842a742c3d0dcc10a2c707b20dd","original_commit_id":"f16cb0ffdbd8c842a742c3d0dcc10a2c707b20dd","user":{"login":"maxbaldanza","id":2786820,"avatar_url":"https://avatars3.githubusercontent.com/u/2786820?v=3","gravatar_id":"","url":"https://api.github.com/users/maxbaldanza","html_url":"https://github.com/maxbaldanza","followers_url":"https://api.github.com/users/maxbaldanza/followers","following_url":"https://api.github.com/users/maxbaldanza/following{/other_user}","gists_url":"https://api.github.com/users/maxbaldanza/gists{/gist_id}","starred_url":"https://api.github.com/users/maxbaldanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxbaldanza/subscriptions","organizations_url":"https://api.github.com/users/maxbaldanza/orgs","repos_url":"https://api.github.com/users/maxbaldanza/repos","events_url":"https://api.github.com/users/maxbaldanza/events{/privacy}","received_events_url":"https://api.github.com/users/maxbaldanza/received_events","type":"User","site_admin":false},"body":"`resetLocation` is used on line 100 when the form is valid. \r\n`reloadTab` will only be used if the form is invalid to take you back to the page you were on. ","created_at":"2017-07-12T12:28:44Z","updated_at":"2017-07-12T12:28:44Z","html_url":"https://github.com/ezsystems/hybrid-platform-ui/pull/54#discussion_r126939649","pull_request_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/comments/126939649"},"html":{"href":"https://github.com/ezsystems/hybrid-platform-ui/pull/54#discussion_r126939649"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54","id":128967827,"html_url":"https://github.com/ezsystems/hybrid-platform-ui/pull/54","diff_url":"https://github.com/ezsystems/hybrid-platform-ui/pull/54.diff","patch_url":"https://github.com/ezsystems/hybrid-platform-ui/pull/54.patch","issue_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/54","number":54,"state":"open","locked":false,"title":"EZP-27505 swap location","user":{"login":"maxbaldanza","id":2786820,"avatar_url":"https://avatars3.githubusercontent.com/u/2786820?v=3","gravatar_id":"","url":"https://api.github.com/users/maxbaldanza","html_url":"https://github.com/maxbaldanza","followers_url":"https://api.github.com/users/maxbaldanza/followers","following_url":"https://api.github.com/users/maxbaldanza/following{/other_user}","gists_url":"https://api.github.com/users/maxbaldanza/gists{/gist_id}","starred_url":"https://api.github.com/users/maxbaldanza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxbaldanza/subscriptions","organizations_url":"https://api.github.com/users/maxbaldanza/orgs","repos_url":"https://api.github.com/users/maxbaldanza/repos","events_url":"https://api.github.com/users/maxbaldanza/events{/privacy}","received_events_url":"https://api.github.com/users/maxbaldanza/received_events","type":"User","site_admin":false},"body":"- [X] Allow swapping of two locations \r\n\r\nUntil UDW is implemented than a input box has been used for the location id.\r\n\r\nhttps://jira.ez.no/browse/EZP-27505\r\n\r\n![screen shot 2017-07-07 at 12 47 02](https://user-images.githubusercontent.com/2786820/27956596-7c9a2466-6312-11e7-90a5-f0f8b53a0367.png)\r\n","created_at":"2017-07-05T13:50:34Z","updated_at":"2017-07-12T12:28:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07eb69146a0191487e0c8c5f6003ee31ca01e533","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54/commits","review_comments_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54/comments","review_comment_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/54/comments","statuses_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/statuses/f16cb0ffdbd8c842a742c3d0dcc10a2c707b20dd","head":{"label":"inviqa:feature/EZP-27505-swap-location","ref":"feature/EZP-27505-swap-location","sha":"f16cb0ffdbd8c842a742c3d0dcc10a2c707b20dd","user":{"login":"inviqa","id":1774575,"avatar_url":"https://avatars1.githubusercontent.com/u/1774575?v=3","gravatar_id":"","url":"https://api.github.com/users/inviqa","html_url":"https://github.com/inviqa","followers_url":"https://api.github.com/users/inviqa/followers","following_url":"https://api.github.com/users/inviqa/following{/other_user}","gists_url":"https://api.github.com/users/inviqa/gists{/gist_id}","starred_url":"https://api.github.com/users/inviqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inviqa/subscriptions","organizations_url":"https://api.github.com/users/inviqa/orgs","repos_url":"https://api.github.com/users/inviqa/repos","events_url":"https://api.github.com/users/inviqa/events{/privacy}","received_events_url":"https://api.github.com/users/inviqa/received_events","type":"Organization","site_admin":false},"repo":{"id":94107844,"name":"hybrid-platform-ui","full_name":"inviqa/hybrid-platform-ui","owner":{"login":"inviqa","id":1774575,"avatar_url":"https://avatars1.githubusercontent.com/u/1774575?v=3","gravatar_id":"","url":"https://api.github.com/users/inviqa","html_url":"https://github.com/inviqa","followers_url":"https://api.github.com/users/inviqa/followers","following_url":"https://api.github.com/users/inviqa/following{/other_user}","gists_url":"https://api.github.com/users/inviqa/gists{/gist_id}","starred_url":"https://api.github.com/users/inviqa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inviqa/subscriptions","organizations_url":"https://api.github.com/users/inviqa/orgs","repos_url":"https://api.github.com/users/inviqa/repos","events_url":"https://api.github.com/users/inviqa/events{/privacy}","received_events_url":"https://api.github.com/users/inviqa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inviqa/hybrid-platform-ui","description":null,"fork":true,"url":"https://api.github.com/repos/inviqa/hybrid-platform-ui","forks_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/forks","keys_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/teams","hooks_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/hooks","issue_events_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/issues/events{/number}","events_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/events","assignees_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/assignees{/user}","branches_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/branches{/branch}","tags_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/tags","blobs_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/languages","stargazers_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/stargazers","contributors_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/contributors","subscribers_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/subscribers","subscription_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/subscription","commits_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/contents/{+path}","compare_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/merges","archive_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/downloads","issues_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/issues{/number}","pulls_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/labels{/name}","releases_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/releases{/id}","deployments_url":"https://api.github.com/repos/inviqa/hybrid-platform-ui/deployments","created_at":"2017-06-12T14:50:56Z","updated_at":"2017-06-12T14:50:58Z","pushed_at":"2017-07-12T12:20:11Z","git_url":"git://github.com/inviqa/hybrid-platform-ui.git","ssh_url":"git@github.com:inviqa/hybrid-platform-ui.git","clone_url":"https://github.com/inviqa/hybrid-platform-ui.git","svn_url":"https://github.com/inviqa/hybrid-platform-ui","homepage":null,"size":366,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"aaf66dc6f3d468c79b7604da2ae085ffe9c44ee5","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars2.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":87083975,"name":"hybrid-platform-ui","full_name":"ezsystems/hybrid-platform-ui","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars2.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/hybrid-platform-ui","description":null,"fork":false,"url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui","forks_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/forks","keys_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/teams","hooks_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/events","assignees_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/tags","blobs_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/languages","stargazers_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/subscription","commits_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/merges","archive_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/downloads","issues_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/releases{/id}","deployments_url":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/deployments","created_at":"2017-04-03T14:32:58Z","updated_at":"2017-05-09T20:40:26Z","pushed_at":"2017-07-12T11:38:29Z","git_url":"git://github.com/ezsystems/hybrid-platform-ui.git","ssh_url":"git@github.com:ezsystems/hybrid-platform-ui.git","clone_url":"https://github.com/ezsystems/hybrid-platform-ui.git","svn_url":"https://github.com/ezsystems/hybrid-platform-ui","homepage":null,"size":321,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54"},"html":{"href":"https://github.com/ezsystems/hybrid-platform-ui/pull/54"},"issue":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/54"},"comments":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/hybrid-platform-ui/statuses/f16cb0ffdbd8c842a742c3d0dcc10a2c707b20dd"}}}}
{"actor":{"display_login":"maxbaldanza"}}