{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/71655312","id":71655312,"diff_hunk":"@@ -0,0 +1,47 @@\n+/**\n+ * This Source Code Form is subject to the terms of the Mozilla Public License,\n+ * v. 2.0. If a copy of the MPL was not distributed with this file, You can\n+ * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under\n+ * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.\n+ *\n+ * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS\n+ * graphic logo is a trademark of OpenMRS Inc.\n+ */\n+package org.openmrs.web.controller;\n+\n+import org.junit.Test;\n+import org.openmrs.web.WebConstants;\n+import org.openmrs.web.test.BaseWebContextSensitiveTest;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.mock.web.MockHttpServletRequest;\n+import org.springframework.ui.ModelMap;\n+import org.springframework.web.context.request.ServletWebRequest;\n+import org.springframework.web.context.request.WebRequest;\n+\n+import static org.junit.Assert.assertEquals;\n+\n+/**\n+ *\n+ */\n+public class LoginControllerTest extends BaseWebContextSensitiveTest {\n+\t\n+\t@Autowired\n+\tprivate LoginController controller;\n+\t\n+\t@Test\n+\tpublic void shouldSetTheRedirectAttribute() {\n+\t\tString redirectUrl = \"www.openmrs.org/_HASHTAG_\";\n+\t\t\n+\t\tMockHttpServletRequest mockRequest = new MockHttpServletRequest();\n+\t\tmockRequest.setParameter(\"redirect_url\", redirectUrl);\n+\t\t","path":"web/src/test/java/org/openmrs/web/controller/LoginControllerTest.java","position":37,"original_position":37,"commit_id":"899e5fdf3cb9348c22faed2523facd860cc505c7","original_commit_id":"46f08629aeb6853d4c54abb136035483e6943a18","user":{"login":"AdamGrzybkowski","id":12660801,"avatar_url":"https://avatars.githubusercontent.com/u/12660801?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamGrzybkowski","html_url":"https://github.com/AdamGrzybkowski","followers_url":"https://api.github.com/users/AdamGrzybkowski/followers","following_url":"https://api.github.com/users/AdamGrzybkowski/following{/other_user}","gists_url":"https://api.github.com/users/AdamGrzybkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamGrzybkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamGrzybkowski/subscriptions","organizations_url":"https://api.github.com/users/AdamGrzybkowski/orgs","repos_url":"https://api.github.com/users/AdamGrzybkowski/repos","events_url":"https://api.github.com/users/AdamGrzybkowski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamGrzybkowski/received_events","type":"User","site_admin":false},"body":"Is it better now ?","created_at":"2016-07-21T06:56:42Z","updated_at":"2016-07-21T06:56:42Z","html_url":"https://github.com/openmrs/openmrs-core/pull/1819#discussion_r71655312","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/71655312"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1819#discussion_r71655312"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819","id":77929642,"html_url":"https://github.com/openmrs/openmrs-core/pull/1819","diff_url":"https://github.com/openmrs/openmrs-core/pull/1819.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/1819.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1819","number":1819,"state":"open","locked":false,"title":"TRUNK-4859 Add redirect url parameter to login page","user":{"login":"AdamGrzybkowski","id":12660801,"avatar_url":"https://avatars.githubusercontent.com/u/12660801?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamGrzybkowski","html_url":"https://github.com/AdamGrzybkowski","followers_url":"https://api.github.com/users/AdamGrzybkowski/followers","following_url":"https://api.github.com/users/AdamGrzybkowski/following{/other_user}","gists_url":"https://api.github.com/users/AdamGrzybkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamGrzybkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamGrzybkowski/subscriptions","organizations_url":"https://api.github.com/users/AdamGrzybkowski/orgs","repos_url":"https://api.github.com/users/AdamGrzybkowski/repos","events_url":"https://api.github.com/users/AdamGrzybkowski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamGrzybkowski/received_events","type":"User","site_admin":false},"body":"<!--- Provide PR Title above as: 'TRUNK-JiraIssueNumber JiraIssueTitle' -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail -->\r\nThe existing code was not working properly. The referel_url was being cut after '#\" so it was redirecting only to the main page.\r\nNow all hashes in redirect_url attribute has to be changed to 'HASHTAG', so the link won't be sliced.\r\n\r\n## Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue\r\nfirst -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to\r\nreproduce -->\r\n<!--- Please link to the issue here: -->\r\nsee https://issues.openmrs.org/browse/RA-1111\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that\r\napply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to\r\nhelp! -->\r\n- [x] My pull request only contains one single commit.\r\n- [x] My pull request is based on the latest master branch\r\n  `git pull --rebase upstream master`.\r\n- [x] I ran `mvn clean package` right before creating this pull request and\r\n  added all formatting changes to my commit.\r\n- [x] My code follows the code style of this project.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [x] I have added tests to cover my changes.\r\n- [x] All new and existing tests passed.\r\n\r\n\r\n","created_at":"2016-07-19T07:30:20Z","updated_at":"2016-07-21T06:56:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"360139077e2c16e38a87e30aabe05ff43c55ac42","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1819/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/899e5fdf3cb9348c22faed2523facd860cc505c7","head":{"label":"AdamGrzybkowski:TRUNK-4859","ref":"TRUNK-4859","sha":"899e5fdf3cb9348c22faed2523facd860cc505c7","user":{"login":"AdamGrzybkowski","id":12660801,"avatar_url":"https://avatars.githubusercontent.com/u/12660801?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamGrzybkowski","html_url":"https://github.com/AdamGrzybkowski","followers_url":"https://api.github.com/users/AdamGrzybkowski/followers","following_url":"https://api.github.com/users/AdamGrzybkowski/following{/other_user}","gists_url":"https://api.github.com/users/AdamGrzybkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamGrzybkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamGrzybkowski/subscriptions","organizations_url":"https://api.github.com/users/AdamGrzybkowski/orgs","repos_url":"https://api.github.com/users/AdamGrzybkowski/repos","events_url":"https://api.github.com/users/AdamGrzybkowski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamGrzybkowski/received_events","type":"User","site_admin":false},"repo":{"id":56502344,"name":"openmrs-core","full_name":"AdamGrzybkowski/openmrs-core","owner":{"login":"AdamGrzybkowski","id":12660801,"avatar_url":"https://avatars.githubusercontent.com/u/12660801?v=3","gravatar_id":"","url":"https://api.github.com/users/AdamGrzybkowski","html_url":"https://github.com/AdamGrzybkowski","followers_url":"https://api.github.com/users/AdamGrzybkowski/followers","following_url":"https://api.github.com/users/AdamGrzybkowski/following{/other_user}","gists_url":"https://api.github.com/users/AdamGrzybkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/AdamGrzybkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdamGrzybkowski/subscriptions","organizations_url":"https://api.github.com/users/AdamGrzybkowski/orgs","repos_url":"https://api.github.com/users/AdamGrzybkowski/repos","events_url":"https://api.github.com/users/AdamGrzybkowski/events{/privacy}","received_events_url":"https://api.github.com/users/AdamGrzybkowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AdamGrzybkowski/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core","forks_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/forks","keys_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/teams","hooks_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/events","assignees_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/tags","blobs_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/subscription","commits_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/merges","archive_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/downloads","issues_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/AdamGrzybkowski/openmrs-core/deployments","created_at":"2016-04-18T11:30:50Z","updated_at":"2016-04-18T11:31:02Z","pushed_at":"2016-07-21T06:55:04Z","git_url":"git://github.com/AdamGrzybkowski/openmrs-core.git","ssh_url":"git@github.com:AdamGrzybkowski/openmrs-core.git","clone_url":"https://github.com/AdamGrzybkowski/openmrs-core.git","svn_url":"https://github.com/AdamGrzybkowski/openmrs-core","homepage":"http://openmrs.org","size":220543,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"openmrs:1.11.x","ref":"1.11.x","sha":"6f6d5faaf646eb9c9ba14ad478282fb65acdb694","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":5187976,"name":"openmrs-core","full_name":"openmrs/openmrs-core","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-core","description":"OpenMRS API and web application code","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-core","forks_url":"https://api.github.com/repos/openmrs/openmrs-core/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-core/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-core/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-core/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-core/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-core/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-core/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-core/deployments","created_at":"2012-07-26T04:54:29Z","updated_at":"2016-07-19T14:05:28Z","pushed_at":"2016-07-21T06:55:07Z","git_url":"git://github.com/openmrs/openmrs-core.git","ssh_url":"git@github.com:openmrs/openmrs-core.git","clone_url":"https://github.com/openmrs/openmrs-core.git","svn_url":"https://github.com/openmrs/openmrs-core","homepage":"http://openmrs.org","size":239739,"stargazers_count":345,"watchers_count":345,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1497,"mirror_url":null,"open_issues_count":4,"forks":1497,"open_issues":4,"watchers":345,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1819"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1819"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1819/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1819/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/899e5fdf3cb9348c22faed2523facd860cc505c7"}}}}
{"actor":{"display_login":"AdamGrzybkowski"}}