{"action":"created","comment":{"url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/comments/234537103","pull_request_review_id":176195274,"id":234537103,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDUzNzEwMw==","diff_hunk":"@@ -423,7 +423,7 @@ class Products extends React.Component {\n   };\n \n   searchData = (datum, criteria) => {\n-    if (criteria) {\n+    if (criteria && datum.label) {","path":"web/html/src/manager/products.js","position":5,"original_position":5,"commit_id":"d35ea11469bb5e99bfa8e817645ccc698ad8a6d3","original_commit_id":"b5c3b5908f736dca4bf0bf0b7703fcd6f92057d3","user":{"login":"ncounter","id":7080830,"node_id":"MDQ6VXNlcjcwODA4MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/7080830?v=4","gravatar_id":"","url":"https://api.github.com/users/ncounter","html_url":"https://github.com/ncounter","followers_url":"https://api.github.com/users/ncounter/followers","following_url":"https://api.github.com/users/ncounter/following{/other_user}","gists_url":"https://api.github.com/users/ncounter/gists{/gist_id}","starred_url":"https://api.github.com/users/ncounter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncounter/subscriptions","organizations_url":"https://api.github.com/users/ncounter/orgs","repos_url":"https://api.github.com/users/ncounter/repos","events_url":"https://api.github.com/users/ncounter/events{/privacy}","received_events_url":"https://api.github.com/users/ncounter/received_events","type":"User","site_admin":false},"body":"Is this change related to this PR? It doesn't look like. If so, please remove it from here and add the fix (that makes sense) into a separate commit and PR. Thank you.","created_at":"2018-11-19T09:04:55Z","updated_at":"2018-11-19T09:52:09Z","html_url":"https://github.com/uyuni-project/uyuni/pull/298#discussion_r234537103","pull_request_url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/comments/234537103"},"html":{"href":"https://github.com/uyuni-project/uyuni/pull/298#discussion_r234537103"},"pull_request":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298"}}},"pull_request":{"url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298","id":231109296,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMTA5Mjk2","html_url":"https://github.com/uyuni-project/uyuni/pull/298","diff_url":"https://github.com/uyuni-project/uyuni/pull/298.diff","patch_url":"https://github.com/uyuni-project/uyuni/pull/298.patch","issue_url":"https://api.github.com/repos/uyuni-project/uyuni/issues/298","number":298,"state":"open","locked":false,"title":"1110772 - when changing basechannel the old childchannels are not selected by default","user":{"login":"lneves12","id":1140720,"node_id":"MDQ6VXNlcjExNDA3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1140720?v=4","gravatar_id":"","url":"https://api.github.com/users/lneves12","html_url":"https://github.com/lneves12","followers_url":"https://api.github.com/users/lneves12/followers","following_url":"https://api.github.com/users/lneves12/following{/other_user}","gists_url":"https://api.github.com/users/lneves12/gists{/gist_id}","starred_url":"https://api.github.com/users/lneves12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lneves12/subscriptions","organizations_url":"https://api.github.com/users/lneves12/orgs","repos_url":"https://api.github.com/users/lneves12/repos","events_url":"https://api.github.com/users/lneves12/events{/privacy}","received_events_url":"https://api.github.com/users/lneves12/received_events","type":"User","site_admin":false},"body":"## What does this PR change?\r\n\r\nThis PR fixes a regression bug on the refactor of the subscription channels to React. When we select a new base channel a preselection should be done to all the similar child channels, so a new flag `wasSelectedOnOldBaseChannel` was added to the fetching child channels API.\r\n\r\nAssumptions: The preselection is only applied on the first change, afterwards the user selection is always assumed.\r\n\r\nI also added a new behavior that when a base channel is fetching the respective child channels all the other base channels selection is disabled to avoid weird bugs of inconsistent states.\r\n\r\nI wonder if the old code about base channel assignment shouldn't be removed. It seems that it's not being used anymore. @mateiw is there any plan for that?\r\n\r\nNote: I first implemented this logic in Javascript because I though the algorithm presented in the method `findCompatibleChildren` wasn't being used anymore, which is not true, thus keeping 2 code path wasn't  a good idea. I created a gist with it implemented in javascript just for reference, in case we need it later: https://gist.github.com/lneves12/bb8f0ad9e325aa7f19fa2a455be3b5fd\r\n\r\n## GUI diff\r\n\r\nExample 1:\r\n\r\nSubscribed channels:\r\n![screenshot from 2018-11-15 10-02-05](https://user-images.githubusercontent.com/1140720/48545491-ee57e200-e8bd-11e8-942b-50fe34575daf.png)\r\n\r\nAfter change base channel:\r\n![screenshot from 2018-11-15 10-02-18](https://user-images.githubusercontent.com/1140720/48545512-f9127700-e8bd-11e8-8f53-31e65a546f5f.png)\r\n\r\nExample 2:\r\n\r\nSubscribed channels:\r\n![screenshot from 2018-11-15 09-59-13](https://user-images.githubusercontent.com/1140720/48545520-fe6fc180-e8bd-11e8-93da-4322bdb366af.png)\r\n\r\nAfter change base channel:\r\n![screenshot from 2018-11-15 10-00-17](https://user-images.githubusercontent.com/1140720/48545533-03cd0c00-e8be-11e8-9042-cf842256e4ac.png)\r\n\r\n\r\n- [x] **DONE**\r\n\r\n## Documentation\r\n- No documentation needed:\r\n\r\n- [x] **DONE**\r\n\r\n## Test coverage\r\n- No tests.\r\n\r\n- [x] **DONE**\r\n\r\n## Links\r\n\r\nFixes #https://github.com/SUSE/spacewalk/issues/6018\r\n\r\n- [x] **DONE**\r\n","created_at":"2018-11-15T08:38:15Z","updated_at":"2018-11-19T09:52:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4871c549a2a27622c79a2f17c4dc996856ee4865","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mateiw","id":11468018,"node_id":"MDQ6VXNlcjExNDY4MDE4","avatar_url":"https://avatars2.githubusercontent.com/u/11468018?v=4","gravatar_id":"","url":"https://api.github.com/users/mateiw","html_url":"https://github.com/mateiw","followers_url":"https://api.github.com/users/mateiw/followers","following_url":"https://api.github.com/users/mateiw/following{/other_user}","gists_url":"https://api.github.com/users/mateiw/gists{/gist_id}","starred_url":"https://api.github.com/users/mateiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateiw/subscriptions","organizations_url":"https://api.github.com/users/mateiw/orgs","repos_url":"https://api.github.com/users/mateiw/repos","events_url":"https://api.github.com/users/mateiw/events{/privacy}","received_events_url":"https://api.github.com/users/mateiw/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298/commits","review_comments_url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298/comments","review_comment_url":"https://api.github.com/repos/uyuni-project/uyuni/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uyuni-project/uyuni/issues/298/comments","statuses_url":"https://api.github.com/repos/uyuni-project/uyuni/statuses/d35ea11469bb5e99bfa8e817645ccc698ad8a6d3","head":{"label":"lneves12:1110772_change_childchannel_keepold","ref":"1110772_change_childchannel_keepold","sha":"d35ea11469bb5e99bfa8e817645ccc698ad8a6d3","user":{"login":"lneves12","id":1140720,"node_id":"MDQ6VXNlcjExNDA3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1140720?v=4","gravatar_id":"","url":"https://api.github.com/users/lneves12","html_url":"https://github.com/lneves12","followers_url":"https://api.github.com/users/lneves12/followers","following_url":"https://api.github.com/users/lneves12/following{/other_user}","gists_url":"https://api.github.com/users/lneves12/gists{/gist_id}","starred_url":"https://api.github.com/users/lneves12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lneves12/subscriptions","organizations_url":"https://api.github.com/users/lneves12/orgs","repos_url":"https://api.github.com/users/lneves12/repos","events_url":"https://api.github.com/users/lneves12/events{/privacy}","received_events_url":"https://api.github.com/users/lneves12/received_events","type":"User","site_admin":false},"repo":{"id":145703198,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU3MDMxOTg=","name":"uyuni","full_name":"lneves12/uyuni","private":false,"owner":{"login":"lneves12","id":1140720,"node_id":"MDQ6VXNlcjExNDA3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1140720?v=4","gravatar_id":"","url":"https://api.github.com/users/lneves12","html_url":"https://github.com/lneves12","followers_url":"https://api.github.com/users/lneves12/followers","following_url":"https://api.github.com/users/lneves12/following{/other_user}","gists_url":"https://api.github.com/users/lneves12/gists{/gist_id}","starred_url":"https://api.github.com/users/lneves12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lneves12/subscriptions","organizations_url":"https://api.github.com/users/lneves12/orgs","repos_url":"https://api.github.com/users/lneves12/repos","events_url":"https://api.github.com/users/lneves12/events{/privacy}","received_events_url":"https://api.github.com/users/lneves12/received_events","type":"User","site_admin":false},"html_url":"https://github.com/lneves12/uyuni","description":"Source code for Uyuni","fork":true,"url":"https://api.github.com/repos/lneves12/uyuni","forks_url":"https://api.github.com/repos/lneves12/uyuni/forks","keys_url":"https://api.github.com/repos/lneves12/uyuni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lneves12/uyuni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lneves12/uyuni/teams","hooks_url":"https://api.github.com/repos/lneves12/uyuni/hooks","issue_events_url":"https://api.github.com/repos/lneves12/uyuni/issues/events{/number}","events_url":"https://api.github.com/repos/lneves12/uyuni/events","assignees_url":"https://api.github.com/repos/lneves12/uyuni/assignees{/user}","branches_url":"https://api.github.com/repos/lneves12/uyuni/branches{/branch}","tags_url":"https://api.github.com/repos/lneves12/uyuni/tags","blobs_url":"https://api.github.com/repos/lneves12/uyuni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lneves12/uyuni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lneves12/uyuni/git/refs{/sha}","trees_url":"https://api.github.com/repos/lneves12/uyuni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lneves12/uyuni/statuses/{sha}","languages_url":"https://api.github.com/repos/lneves12/uyuni/languages","stargazers_url":"https://api.github.com/repos/lneves12/uyuni/stargazers","contributors_url":"https://api.github.com/repos/lneves12/uyuni/contributors","subscribers_url":"https://api.github.com/repos/lneves12/uyuni/subscribers","subscription_url":"https://api.github.com/repos/lneves12/uyuni/subscription","commits_url":"https://api.github.com/repos/lneves12/uyuni/commits{/sha}","git_commits_url":"https://api.github.com/repos/lneves12/uyuni/git/commits{/sha}","comments_url":"https://api.github.com/repos/lneves12/uyuni/comments{/number}","issue_comment_url":"https://api.github.com/repos/lneves12/uyuni/issues/comments{/number}","contents_url":"https://api.github.com/repos/lneves12/uyuni/contents/{+path}","compare_url":"https://api.github.com/repos/lneves12/uyuni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lneves12/uyuni/merges","archive_url":"https://api.github.com/repos/lneves12/uyuni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lneves12/uyuni/downloads","issues_url":"https://api.github.com/repos/lneves12/uyuni/issues{/number}","pulls_url":"https://api.github.com/repos/lneves12/uyuni/pulls{/number}","milestones_url":"https://api.github.com/repos/lneves12/uyuni/milestones{/number}","notifications_url":"https://api.github.com/repos/lneves12/uyuni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lneves12/uyuni/labels{/name}","releases_url":"https://api.github.com/repos/lneves12/uyuni/releases{/id}","deployments_url":"https://api.github.com/repos/lneves12/uyuni/deployments","created_at":"2018-08-22T12:01:29Z","updated_at":"2018-09-11T15:31:31Z","pushed_at":"2018-11-19T09:10:02Z","git_url":"git://github.com/lneves12/uyuni.git","ssh_url":"git@github.com:lneves12/uyuni.git","clone_url":"https://github.com/lneves12/uyuni.git","svn_url":"https://github.com/lneves12/uyuni","homepage":"https://www.uyuni-project.org/","size":791262,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"uyuni-project:master","ref":"master","sha":"80a715281a71e614479ac3e4a1f803ec2d5b4a7b","user":{"login":"uyuni-project","id":39272261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjcyMjYx","avatar_url":"https://avatars0.githubusercontent.com/u/39272261?v=4","gravatar_id":"","url":"https://api.github.com/users/uyuni-project","html_url":"https://github.com/uyuni-project","followers_url":"https://api.github.com/users/uyuni-project/followers","following_url":"https://api.github.com/users/uyuni-project/following{/other_user}","gists_url":"https://api.github.com/users/uyuni-project/gists{/gist_id}","starred_url":"https://api.github.com/users/uyuni-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uyuni-project/subscriptions","organizations_url":"https://api.github.com/users/uyuni-project/orgs","repos_url":"https://api.github.com/users/uyuni-project/repos","events_url":"https://api.github.com/users/uyuni-project/events{/privacy}","received_events_url":"https://api.github.com/users/uyuni-project/received_events","type":"Organization","site_admin":false},"repo":{"id":143291989,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMyOTE5ODk=","name":"uyuni","full_name":"uyuni-project/uyuni","private":false,"owner":{"login":"uyuni-project","id":39272261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MjcyMjYx","avatar_url":"https://avatars0.githubusercontent.com/u/39272261?v=4","gravatar_id":"","url":"https://api.github.com/users/uyuni-project","html_url":"https://github.com/uyuni-project","followers_url":"https://api.github.com/users/uyuni-project/followers","following_url":"https://api.github.com/users/uyuni-project/following{/other_user}","gists_url":"https://api.github.com/users/uyuni-project/gists{/gist_id}","starred_url":"https://api.github.com/users/uyuni-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uyuni-project/subscriptions","organizations_url":"https://api.github.com/users/uyuni-project/orgs","repos_url":"https://api.github.com/users/uyuni-project/repos","events_url":"https://api.github.com/users/uyuni-project/events{/privacy}","received_events_url":"https://api.github.com/users/uyuni-project/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/uyuni-project/uyuni","description":"Source code for Uyuni","fork":false,"url":"https://api.github.com/repos/uyuni-project/uyuni","forks_url":"https://api.github.com/repos/uyuni-project/uyuni/forks","keys_url":"https://api.github.com/repos/uyuni-project/uyuni/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uyuni-project/uyuni/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uyuni-project/uyuni/teams","hooks_url":"https://api.github.com/repos/uyuni-project/uyuni/hooks","issue_events_url":"https://api.github.com/repos/uyuni-project/uyuni/issues/events{/number}","events_url":"https://api.github.com/repos/uyuni-project/uyuni/events","assignees_url":"https://api.github.com/repos/uyuni-project/uyuni/assignees{/user}","branches_url":"https://api.github.com/repos/uyuni-project/uyuni/branches{/branch}","tags_url":"https://api.github.com/repos/uyuni-project/uyuni/tags","blobs_url":"https://api.github.com/repos/uyuni-project/uyuni/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uyuni-project/uyuni/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uyuni-project/uyuni/git/refs{/sha}","trees_url":"https://api.github.com/repos/uyuni-project/uyuni/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uyuni-project/uyuni/statuses/{sha}","languages_url":"https://api.github.com/repos/uyuni-project/uyuni/languages","stargazers_url":"https://api.github.com/repos/uyuni-project/uyuni/stargazers","contributors_url":"https://api.github.com/repos/uyuni-project/uyuni/contributors","subscribers_url":"https://api.github.com/repos/uyuni-project/uyuni/subscribers","subscription_url":"https://api.github.com/repos/uyuni-project/uyuni/subscription","commits_url":"https://api.github.com/repos/uyuni-project/uyuni/commits{/sha}","git_commits_url":"https://api.github.com/repos/uyuni-project/uyuni/git/commits{/sha}","comments_url":"https://api.github.com/repos/uyuni-project/uyuni/comments{/number}","issue_comment_url":"https://api.github.com/repos/uyuni-project/uyuni/issues/comments{/number}","contents_url":"https://api.github.com/repos/uyuni-project/uyuni/contents/{+path}","compare_url":"https://api.github.com/repos/uyuni-project/uyuni/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uyuni-project/uyuni/merges","archive_url":"https://api.github.com/repos/uyuni-project/uyuni/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uyuni-project/uyuni/downloads","issues_url":"https://api.github.com/repos/uyuni-project/uyuni/issues{/number}","pulls_url":"https://api.github.com/repos/uyuni-project/uyuni/pulls{/number}","milestones_url":"https://api.github.com/repos/uyuni-project/uyuni/milestones{/number}","notifications_url":"https://api.github.com/repos/uyuni-project/uyuni/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uyuni-project/uyuni/labels{/name}","releases_url":"https://api.github.com/repos/uyuni-project/uyuni/releases{/id}","deployments_url":"https://api.github.com/repos/uyuni-project/uyuni/deployments","created_at":"2018-08-02T12:31:20Z","updated_at":"2018-11-19T07:58:46Z","pushed_at":"2018-11-19T09:10:05Z","git_url":"git://github.com/uyuni-project/uyuni.git","ssh_url":"git@github.com:uyuni-project/uyuni.git","clone_url":"https://github.com/uyuni-project/uyuni.git","svn_url":"https://github.com/uyuni-project/uyuni","homepage":"https://www.uyuni-project.org/","size":791232,"stargazers_count":25,"watchers_count":25,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":25,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":23,"open_issues":25,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298"},"html":{"href":"https://github.com/uyuni-project/uyuni/pull/298"},"issue":{"href":"https://api.github.com/repos/uyuni-project/uyuni/issues/298"},"comments":{"href":"https://api.github.com/repos/uyuni-project/uyuni/issues/298/comments"},"review_comments":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298/comments"},"review_comment":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uyuni-project/uyuni/pulls/298/commits"},"statuses":{"href":"https://api.github.com/repos/uyuni-project/uyuni/statuses/d35ea11469bb5e99bfa8e817645ccc698ad8a6d3"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ncounter"}}