{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/comments/61913380","id":61913380,"diff_hunk":"@@ -36,6 +42,25 @@ function($scope, $routeParams, $location, $timeout, Rules, Search, $modal, $rout\n   $scope.$watch('ordering_str', function(value) {\n     $scope.ordering = value.value.split(',');\n   });\n+\n+  $scope.$watch('pr_ch_filter', function(value) {\n+    $scope.pr_ch_selected = value.split(',');\n+  });\n+\n+  $scope.pr_ch_options = [\"All rules\"];\n+  Rules.getProducts().success(function(response_prs) {\n+    Rules.getChannels().success(function(response_chs) {\n+      response_prs.product.forEach(function(pr) {\n+        response_chs.channel.forEach(function(ch) {\n+          if (!ch.contains(\"-\") && !ch.contains(\"*\") && $scope.pairExists(pr, ch)){","path":"app/js/controllers/rules_controller.js","position":27,"original_position":27,"commit_id":"807636b1355e4711a5bf625048cf7460e3889af7","original_commit_id":"807636b1355e4711a5bf625048cf7460e3889af7","user":{"login":"bhearsum","id":49649,"avatar_url":"https://avatars.githubusercontent.com/u/49649?v=3","gravatar_id":"","url":"https://api.github.com/users/bhearsum","html_url":"https://github.com/bhearsum","followers_url":"https://api.github.com/users/bhearsum/followers","following_url":"https://api.github.com/users/bhearsum/following{/other_user}","gists_url":"https://api.github.com/users/bhearsum/gists{/gist_id}","starred_url":"https://api.github.com/users/bhearsum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhearsum/subscriptions","organizations_url":"https://api.github.com/users/bhearsum/orgs","repos_url":"https://api.github.com/users/bhearsum/repos","events_url":"https://api.github.com/users/bhearsum/events{/privacy}","received_events_url":"https://api.github.com/users/bhearsum/received_events","type":"User","site_admin":false},"body":"I think what might be happening is that this new block of code is always executed in this controller, but $scope.pairExists only exists if rule_id isn't set (it's in the else block of the if/else that starts at line 8). Maybe this should be in that else block as well? This filter probably doesn't matter for a single rule view.","created_at":"2016-05-03T16:38:49Z","updated_at":"2016-05-03T16:38:49Z","html_url":"https://github.com/mozilla/balrog-ui/pull/24#discussion_r61913380","pull_request_url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/comments/61913380"},"html":{"href":"https://github.com/mozilla/balrog-ui/pull/24#discussion_r61913380"},"pull_request":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24","id":67744881,"html_url":"https://github.com/mozilla/balrog-ui/pull/24","diff_url":"https://github.com/mozilla/balrog-ui/pull/24.diff","patch_url":"https://github.com/mozilla/balrog-ui/pull/24.patch","issue_url":"https://api.github.com/repos/mozilla/balrog-ui/issues/24","number":24,"state":"open","locked":false,"title":"[WIP] - Revamp rules view ui","user":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-25T16:01:12Z","updated_at":"2016-05-03T16:38:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b99ac5366ac7be617e785024a77bc15b8a1c1f00","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24/commits","review_comments_url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24/comments","review_comment_url":"https://api.github.com/repos/mozilla/balrog-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/balrog-ui/issues/24/comments","statuses_url":"https://api.github.com/repos/mozilla/balrog-ui/statuses/807636b1355e4711a5bf625048cf7460e3889af7","head":{"label":"njirap:rules_ui_revamp","ref":"rules_ui_revamp","sha":"807636b1355e4711a5bf625048cf7460e3889af7","user":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"repo":{"id":53967706,"name":"balrog-ui","full_name":"njirap/balrog-ui","owner":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/njirap/balrog-ui","description":"UI for RelEng Balrog","fork":true,"url":"https://api.github.com/repos/njirap/balrog-ui","forks_url":"https://api.github.com/repos/njirap/balrog-ui/forks","keys_url":"https://api.github.com/repos/njirap/balrog-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njirap/balrog-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njirap/balrog-ui/teams","hooks_url":"https://api.github.com/repos/njirap/balrog-ui/hooks","issue_events_url":"https://api.github.com/repos/njirap/balrog-ui/issues/events{/number}","events_url":"https://api.github.com/repos/njirap/balrog-ui/events","assignees_url":"https://api.github.com/repos/njirap/balrog-ui/assignees{/user}","branches_url":"https://api.github.com/repos/njirap/balrog-ui/branches{/branch}","tags_url":"https://api.github.com/repos/njirap/balrog-ui/tags","blobs_url":"https://api.github.com/repos/njirap/balrog-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njirap/balrog-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njirap/balrog-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/njirap/balrog-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njirap/balrog-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/njirap/balrog-ui/languages","stargazers_url":"https://api.github.com/repos/njirap/balrog-ui/stargazers","contributors_url":"https://api.github.com/repos/njirap/balrog-ui/contributors","subscribers_url":"https://api.github.com/repos/njirap/balrog-ui/subscribers","subscription_url":"https://api.github.com/repos/njirap/balrog-ui/subscription","commits_url":"https://api.github.com/repos/njirap/balrog-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/njirap/balrog-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/njirap/balrog-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/njirap/balrog-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/njirap/balrog-ui/contents/{+path}","compare_url":"https://api.github.com/repos/njirap/balrog-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njirap/balrog-ui/merges","archive_url":"https://api.github.com/repos/njirap/balrog-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njirap/balrog-ui/downloads","issues_url":"https://api.github.com/repos/njirap/balrog-ui/issues{/number}","pulls_url":"https://api.github.com/repos/njirap/balrog-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/njirap/balrog-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/njirap/balrog-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njirap/balrog-ui/labels{/name}","releases_url":"https://api.github.com/repos/njirap/balrog-ui/releases{/id}","deployments_url":"https://api.github.com/repos/njirap/balrog-ui/deployments","created_at":"2016-03-15T18:11:49Z","updated_at":"2016-03-15T18:11:50Z","pushed_at":"2016-05-03T07:09:21Z","git_url":"git://github.com/njirap/balrog-ui.git","ssh_url":"git@github.com:njirap/balrog-ui.git","clone_url":"https://github.com/njirap/balrog-ui.git","svn_url":"https://github.com/njirap/balrog-ui","homepage":null,"size":2393,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mozilla:master","ref":"master","sha":"ceb80aa4fdc516f7f5e576dc1b52810fd8e83f77","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":25227519,"name":"balrog-ui","full_name":"mozilla/balrog-ui","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/balrog-ui","description":"UI for RelEng Balrog","fork":false,"url":"https://api.github.com/repos/mozilla/balrog-ui","forks_url":"https://api.github.com/repos/mozilla/balrog-ui/forks","keys_url":"https://api.github.com/repos/mozilla/balrog-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/balrog-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/balrog-ui/teams","hooks_url":"https://api.github.com/repos/mozilla/balrog-ui/hooks","issue_events_url":"https://api.github.com/repos/mozilla/balrog-ui/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/balrog-ui/events","assignees_url":"https://api.github.com/repos/mozilla/balrog-ui/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/balrog-ui/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/balrog-ui/tags","blobs_url":"https://api.github.com/repos/mozilla/balrog-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/balrog-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/balrog-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/balrog-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/balrog-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/balrog-ui/languages","stargazers_url":"https://api.github.com/repos/mozilla/balrog-ui/stargazers","contributors_url":"https://api.github.com/repos/mozilla/balrog-ui/contributors","subscribers_url":"https://api.github.com/repos/mozilla/balrog-ui/subscribers","subscription_url":"https://api.github.com/repos/mozilla/balrog-ui/subscription","commits_url":"https://api.github.com/repos/mozilla/balrog-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/balrog-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/balrog-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/balrog-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/balrog-ui/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/balrog-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/balrog-ui/merges","archive_url":"https://api.github.com/repos/mozilla/balrog-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/balrog-ui/downloads","issues_url":"https://api.github.com/repos/mozilla/balrog-ui/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/balrog-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/balrog-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/balrog-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/balrog-ui/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/balrog-ui/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/balrog-ui/deployments","created_at":"2014-10-14T21:29:26Z","updated_at":"2016-03-21T19:41:31Z","pushed_at":"2016-05-03T07:09:21Z","git_url":"git://github.com/mozilla/balrog-ui.git","ssh_url":"git@github.com:mozilla/balrog-ui.git","clone_url":"https://github.com/mozilla/balrog-ui.git","svn_url":"https://github.com/mozilla/balrog-ui","homepage":null,"size":2325,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24"},"html":{"href":"https://github.com/mozilla/balrog-ui/pull/24"},"issue":{"href":"https://api.github.com/repos/mozilla/balrog-ui/issues/24"},"comments":{"href":"https://api.github.com/repos/mozilla/balrog-ui/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/balrog-ui/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/balrog-ui/statuses/807636b1355e4711a5bf625048cf7460e3889af7"}}}}