{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/41236938","id":41236938,"diff_hunk":"@@ -0,0 +1,227 @@\n+/*\n+ * The MIT License\n+ *\n+ * Copyright (c) 2015, CloudBees, Inc.\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+package hudson;\n+\n+import com.gargoylesoftware.htmlunit.html.DomElement;\n+import com.gargoylesoftware.htmlunit.html.HtmlElement;\n+import com.gargoylesoftware.htmlunit.html.HtmlElementUtil;\n+import com.gargoylesoftware.htmlunit.html.HtmlInput;\n+import com.gargoylesoftware.htmlunit.html.HtmlPage;\n+import com.gargoylesoftware.htmlunit.html.HtmlTableRow;\n+import org.junit.Assert;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.jvnet.hudson.test.JenkinsRule;\n+import org.jvnet.hudson.test.recipes.WithPlugin;\n+import org.xml.sax.SAXException;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+\n+/**\n+ * @author <a href=\"mailto:tom.fennelly@gmail.com\">tom.fennelly@gmail.com</a>\n+ */\n+public class PluginManagerInstalledGUITest {\n+\n+    @Rule\n+    public JenkinsRule jenkinsRule = new JenkinsRule();\n+    \n+    @Test\n+    @WithPlugin(\"tasks.jpi\")","path":"test/src/test/java/hudson/PluginManagerInstalledGUITest.java","position":55,"original_position":55,"commit_id":"955eb7274a02e3549493cd2e1e0de785a0893784","original_commit_id":"955eb7274a02e3549493cd2e1e0de785a0893784","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"body":"@amuniz You mean the `.jpi` file extension? Maybe not ... I just copied from somewhere else.","created_at":"2015-10-06T08:30:07Z","updated_at":"2015-10-06T08:30:07Z","html_url":"https://github.com/jenkinsci/jenkins/pull/1847#discussion_r41236938","pull_request_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments/41236938"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1847#discussion_r41236938"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847","id":46543099,"html_url":"https://github.com/jenkinsci/jenkins/pull/1847","diff_url":"https://github.com/jenkinsci/jenkins/pull/1847.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/1847.patch","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1847","number":1847,"state":"open","locked":false,"title":"[FIXED JENKINS-23150] Plugin Manager - Only allow enable/disable/uninstall when all dependants or dependencies are disabled/enabled","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"body":"[JENKINS-23150](https://issues.jenkins-ci.org/browse/JENKINS-23150)\r\n\r\n[![PR1847](https://i.ytimg.com/vi/YMLKumX-kkI/mqdefault.jpg)](https://youtu.be/YMLKumX-kkI)\r\n\r\n- [x] Don't allow uninstall of a plugin while it has installed dependants.\r\n- [x] Don't allow disable of a plugin while it has dependants that are currently enabled. They must be disabled first.\r\n- [x] Don't allow enable of a plugin while it has dependencies that are disabled. They must be enabled first.\r\n- [x] When an action is not possible, show a list of all relevant plugins. This guides the user to where they need to go next (what plugins need to be enabled, disabled, uninstalled).\r\n- [x] Create a demo video for this PR showing the new behaviour.\r\n- [x] Localise some strings currently hardcoded in the JavaScript.\r\n- [x] Big loud warning if Jenkins instance requires restart.\r\n- [x] More unit tests.","created_at":"2015-10-01T16:03:19Z","updated_at":"2015-10-06T08:30:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"431b042452c0e93f548c1f0693a7b9fc26f3e659","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1847/comments","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/955eb7274a02e3549493cd2e1e0de785a0893784","head":{"label":"tfennelly:plugin-manager-dependants","ref":"plugin-manager-dependants","sha":"955eb7274a02e3549493cd2e1e0de785a0893784","user":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"repo":{"id":14962669,"name":"jenkins","full_name":"tfennelly/jenkins","owner":{"login":"tfennelly","id":429311,"avatar_url":"https://avatars.githubusercontent.com/u/429311?v=3","gravatar_id":"","url":"https://api.github.com/users/tfennelly","html_url":"https://github.com/tfennelly","followers_url":"https://api.github.com/users/tfennelly/followers","following_url":"https://api.github.com/users/tfennelly/following{/other_user}","gists_url":"https://api.github.com/users/tfennelly/gists{/gist_id}","starred_url":"https://api.github.com/users/tfennelly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfennelly/subscriptions","organizations_url":"https://api.github.com/users/tfennelly/orgs","repos_url":"https://api.github.com/users/tfennelly/repos","events_url":"https://api.github.com/users/tfennelly/events{/privacy}","received_events_url":"https://api.github.com/users/tfennelly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tfennelly/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/tfennelly/jenkins","forks_url":"https://api.github.com/repos/tfennelly/jenkins/forks","keys_url":"https://api.github.com/repos/tfennelly/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tfennelly/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tfennelly/jenkins/teams","hooks_url":"https://api.github.com/repos/tfennelly/jenkins/hooks","issue_events_url":"https://api.github.com/repos/tfennelly/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/tfennelly/jenkins/events","assignees_url":"https://api.github.com/repos/tfennelly/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/tfennelly/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/tfennelly/jenkins/tags","blobs_url":"https://api.github.com/repos/tfennelly/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tfennelly/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tfennelly/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/tfennelly/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tfennelly/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/tfennelly/jenkins/languages","stargazers_url":"https://api.github.com/repos/tfennelly/jenkins/stargazers","contributors_url":"https://api.github.com/repos/tfennelly/jenkins/contributors","subscribers_url":"https://api.github.com/repos/tfennelly/jenkins/subscribers","subscription_url":"https://api.github.com/repos/tfennelly/jenkins/subscription","commits_url":"https://api.github.com/repos/tfennelly/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/tfennelly/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/tfennelly/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/tfennelly/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/tfennelly/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/tfennelly/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tfennelly/jenkins/merges","archive_url":"https://api.github.com/repos/tfennelly/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tfennelly/jenkins/downloads","issues_url":"https://api.github.com/repos/tfennelly/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/tfennelly/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/tfennelly/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/tfennelly/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tfennelly/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/tfennelly/jenkins/releases{/id}","created_at":"2013-12-05T18:53:16Z","updated_at":"2015-05-25T18:58:11Z","pushed_at":"2015-10-05T17:52:01Z","git_url":"git://github.com/tfennelly/jenkins.git","ssh_url":"git@github.com:tfennelly/jenkins.git","clone_url":"https://github.com/tfennelly/jenkins.git","svn_url":"https://github.com/tfennelly/jenkins","homepage":"http://jenkins-ci.org/","size":89648,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"5b4b66d8bcc4c3effae9329236edbfac2bccdd84","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":1103607,"name":"jenkins","full_name":"jenkinsci/jenkins","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/jenkins","description":"Jenkins Continuous Integration Server","fork":true,"url":"https://api.github.com/repos/jenkinsci/jenkins","forks_url":"https://api.github.com/repos/jenkinsci/jenkins/forks","keys_url":"https://api.github.com/repos/jenkinsci/jenkins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/jenkins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/jenkins/teams","hooks_url":"https://api.github.com/repos/jenkinsci/jenkins/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/jenkins/events","assignees_url":"https://api.github.com/repos/jenkinsci/jenkins/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/jenkins/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/jenkins/tags","blobs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/jenkins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/jenkins/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/jenkins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/jenkins/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/jenkins/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/jenkins/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/jenkins/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/jenkins/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/jenkins/subscription","commits_url":"https://api.github.com/repos/jenkinsci/jenkins/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/jenkins/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/jenkins/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/jenkins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/jenkins/merges","archive_url":"https://api.github.com/repos/jenkinsci/jenkins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/jenkins/downloads","issues_url":"https://api.github.com/repos/jenkinsci/jenkins/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/jenkins/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/jenkins/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/jenkins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/jenkins/releases{/id}","created_at":"2010-11-22T21:21:23Z","updated_at":"2015-10-06T03:19:46Z","pushed_at":"2015-10-06T08:28:36Z","git_url":"git://github.com/jenkinsci/jenkins.git","ssh_url":"git@github.com:jenkinsci/jenkins.git","clone_url":"https://github.com/jenkinsci/jenkins.git","svn_url":"https://github.com/jenkinsci/jenkins","homepage":"http://jenkins-ci.org/","size":456794,"stargazers_count":4613,"watchers_count":4613,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2046,"mirror_url":null,"open_issues_count":123,"forks":2046,"open_issues":123,"watchers":4613,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847"},"html":{"href":"https://github.com/jenkinsci/jenkins/pull/1847"},"issue":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1847"},"comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/issues/1847/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1847/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/jenkins/statuses/955eb7274a02e3549493cd2e1e0de785a0893784"}}}}