{"action":"created","comment":{"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments/203578296","pull_request_review_id":138495605,"id":203578296,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzU3ODI5Ng==","diff_hunk":"@@ -56,7 +56,32 @@ $(document).ready(function () {\n         target = target.replace(\"request-type-\", \"\");\n         var targetId = \"#\" + document.activeElement.id;\n         $(targetId).off().change(function () {\n-            renderCustomRequestForm(target);\n+            if (categorized && categorySelected) {\n+                var formId = $(targetId).val();\n+                var selectedCategory = formCategories[formId];\n+                // if the selected category is not the same as the current category warn the user with a modal\n+                if (selectedCategory !== currentCategory && formId !== \"\") {\n+                    // show the modal\n+                    $(\"#category-warning-modal\").modal({\n+                        backdrop: 'static',\n+                        keyboard: false\n+                    });\n+                    // handle modal button actions\n+                    $(\"#change-category-button\").off().click(function () {\n+                        handleCategorySwitch(formId);\n+                    });\n+                    $(\"#cancel-change-category-button\").off().click(function () {\n+                        $(targetId).val(previousValues[target - 1]);","path":"app/static/js/request/new-request-agency.js","position":20,"original_position":20,"commit_id":"69acaa8bfa189330137d922b73ff963b7cfb7730","original_commit_id":"69acaa8bfa189330137d922b73ff963b7cfb7730","user":{"login":"codacy-bot","id":19940114,"node_id":"MDQ6VXNlcjE5OTQwMTE0","avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: ['previousValues' is not defined. (no-undef)](https://app.codacy.com/app/NYCRecords/NYCOpenRecords/pullRequest?prid=1793780)","created_at":"2018-07-19T01:20:35Z","updated_at":"2018-07-19T01:20:35Z","html_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383#discussion_r203578296","pull_request_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments/203578296"},"html":{"href":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383#discussion_r203578296"},"pull_request":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383"}}},"pull_request":{"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383","id":195571791,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NTcxNzkx","html_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383","diff_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383.diff","patch_url":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383.patch","issue_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/383","number":383,"state":"open","locked":false,"title":"Feature/OP-1486: Form Categories QA Fix","user":{"login":"johnyu95","id":20359562,"node_id":"MDQ6VXNlcjIwMzU5NTYy","avatar_url":"https://avatars2.githubusercontent.com/u/20359562?v=4","gravatar_id":"","url":"https://api.github.com/users/johnyu95","html_url":"https://github.com/johnyu95","followers_url":"https://api.github.com/users/johnyu95/followers","following_url":"https://api.github.com/users/johnyu95/following{/other_user}","gists_url":"https://api.github.com/users/johnyu95/gists{/gist_id}","starred_url":"https://api.github.com/users/johnyu95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnyu95/subscriptions","organizations_url":"https://api.github.com/users/johnyu95/orgs","repos_url":"https://api.github.com/users/johnyu95/repos","events_url":"https://api.github.com/users/johnyu95/events{/privacy}","received_events_url":"https://api.github.com/users/johnyu95/received_events","type":"User","site_admin":false},"body":"User is unable to choose a different form if they first select the last form (NYPD Test Form) by mistake for their first form.\r\n\r\nThe same happens if you choose a form before the last form.\r\n\r\nThe user would have to go out of Request a Record or refresh the page to get a new form.\r\n\r\nIs it possible to have the rule work once the Add New Request Information button is selected?","created_at":"2018-06-18T15:55:23Z","updated_at":"2018-07-19T01:20:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"10aa75415011e66cd663fcf2d09e64d4c351f382","assignee":{"login":"joelbcastillo","id":3308161,"node_id":"MDQ6VXNlcjMzMDgxNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/3308161?v=4","gravatar_id":"","url":"https://api.github.com/users/joelbcastillo","html_url":"https://github.com/joelbcastillo","followers_url":"https://api.github.com/users/joelbcastillo/followers","following_url":"https://api.github.com/users/joelbcastillo/following{/other_user}","gists_url":"https://api.github.com/users/joelbcastillo/gists{/gist_id}","starred_url":"https://api.github.com/users/joelbcastillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelbcastillo/subscriptions","organizations_url":"https://api.github.com/users/joelbcastillo/orgs","repos_url":"https://api.github.com/users/joelbcastillo/repos","events_url":"https://api.github.com/users/joelbcastillo/events{/privacy}","received_events_url":"https://api.github.com/users/joelbcastillo/received_events","type":"User","site_admin":false},"assignees":[{"login":"joelbcastillo","id":3308161,"node_id":"MDQ6VXNlcjMzMDgxNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/3308161?v=4","gravatar_id":"","url":"https://api.github.com/users/joelbcastillo","html_url":"https://github.com/joelbcastillo","followers_url":"https://api.github.com/users/joelbcastillo/followers","following_url":"https://api.github.com/users/joelbcastillo/following{/other_user}","gists_url":"https://api.github.com/users/joelbcastillo/gists{/gist_id}","starred_url":"https://api.github.com/users/joelbcastillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelbcastillo/subscriptions","organizations_url":"https://api.github.com/users/joelbcastillo/orgs","repos_url":"https://api.github.com/users/joelbcastillo/repos","events_url":"https://api.github.com/users/joelbcastillo/events{/privacy}","received_events_url":"https://api.github.com/users/joelbcastillo/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383/commits","review_comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383/comments","review_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/383/comments","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/69acaa8bfa189330137d922b73ff963b7cfb7730","head":{"label":"CityOfNewYork:feature/OP-1486","ref":"feature/OP-1486","sha":"69acaa8bfa189330137d922b73ff963b7cfb7730","user":{"login":"CityOfNewYork","id":1107978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDc5Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"repo":{"id":36671696,"node_id":"MDEwOlJlcG9zaXRvcnkzNjY3MTY5Ng==","name":"NYCOpenRecords","full_name":"CityOfNewYork/NYCOpenRecords","owner":{"login":"CityOfNewYork","id":1107978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDc5Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfNewYork/NYCOpenRecords","description":"A web application to submit and view Freedom of Information Law requests","fork":false,"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords","forks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/forks","keys_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/teams","hooks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/hooks","issue_events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/events","assignees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/tags","blobs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/languages","stargazers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/stargazers","contributors_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contributors","subscribers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscribers","subscription_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscription","commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/merges","archive_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/downloads","issues_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/labels{/name}","releases_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/deployments","created_at":"2015-06-01T15:56:23Z","updated_at":"2018-07-16T11:51:07Z","pushed_at":"2018-07-18T23:30:33Z","git_url":"git://github.com/CityOfNewYork/NYCOpenRecords.git","ssh_url":"git@github.com:CityOfNewYork/NYCOpenRecords.git","clone_url":"https://github.com/CityOfNewYork/NYCOpenRecords.git","svn_url":"https://github.com/CityOfNewYork/NYCOpenRecords","homepage":"http://nyc.gov/openrecords","size":47721,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":7,"watchers":27,"default_branch":"develop"}},"base":{"label":"CityOfNewYork:develop","ref":"develop","sha":"1ff6d7941f62599f968335aeb2fba9326a9430dc","user":{"login":"CityOfNewYork","id":1107978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDc5Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"repo":{"id":36671696,"node_id":"MDEwOlJlcG9zaXRvcnkzNjY3MTY5Ng==","name":"NYCOpenRecords","full_name":"CityOfNewYork/NYCOpenRecords","owner":{"login":"CityOfNewYork","id":1107978,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMDc5Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1107978?v=4","gravatar_id":"","url":"https://api.github.com/users/CityOfNewYork","html_url":"https://github.com/CityOfNewYork","followers_url":"https://api.github.com/users/CityOfNewYork/followers","following_url":"https://api.github.com/users/CityOfNewYork/following{/other_user}","gists_url":"https://api.github.com/users/CityOfNewYork/gists{/gist_id}","starred_url":"https://api.github.com/users/CityOfNewYork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CityOfNewYork/subscriptions","organizations_url":"https://api.github.com/users/CityOfNewYork/orgs","repos_url":"https://api.github.com/users/CityOfNewYork/repos","events_url":"https://api.github.com/users/CityOfNewYork/events{/privacy}","received_events_url":"https://api.github.com/users/CityOfNewYork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CityOfNewYork/NYCOpenRecords","description":"A web application to submit and view Freedom of Information Law requests","fork":false,"url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords","forks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/forks","keys_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/teams","hooks_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/hooks","issue_events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/events{/number}","events_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/events","assignees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/assignees{/user}","branches_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/branches{/branch}","tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/tags","blobs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/refs{/sha}","trees_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/{sha}","languages_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/languages","stargazers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/stargazers","contributors_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contributors","subscribers_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscribers","subscription_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/subscription","commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/commits{/sha}","git_commits_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/git/commits{/sha}","comments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/comments{/number}","issue_comment_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/comments{/number}","contents_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/contents/{+path}","compare_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/merges","archive_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/downloads","issues_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues{/number}","pulls_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls{/number}","milestones_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/milestones{/number}","notifications_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/labels{/name}","releases_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/releases{/id}","deployments_url":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/deployments","created_at":"2015-06-01T15:56:23Z","updated_at":"2018-07-16T11:51:07Z","pushed_at":"2018-07-18T23:30:33Z","git_url":"git://github.com/CityOfNewYork/NYCOpenRecords.git","ssh_url":"git@github.com:CityOfNewYork/NYCOpenRecords.git","clone_url":"https://github.com/CityOfNewYork/NYCOpenRecords.git","svn_url":"https://github.com/CityOfNewYork/NYCOpenRecords","homepage":"http://nyc.gov/openrecords","size":47721,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4,"open_issues":7,"watchers":27,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383"},"html":{"href":"https://github.com/CityOfNewYork/NYCOpenRecords/pull/383"},"issue":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/383"},"comments":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/issues/383/comments"},"review_comments":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383/comments"},"review_comment":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/pulls/383/commits"},"statuses":{"href":"https://api.github.com/repos/CityOfNewYork/NYCOpenRecords/statuses/69acaa8bfa189330137d922b73ff963b7cfb7730"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}