{"action":"created","comment":{"url":"https://api.github.com/repos/dotCMS/core/pulls/comments/166424943","pull_request_review_id":94484630,"id":166424943,"diff_hunk":"@@ -910,6 +916,197 @@ public void findAction() throws DotDataException, DotSecurityException {\n \n     }\n \n+    /**\n+     * This Test validate that a workflow step could not be deleted if depends of another step or\n+     * has a contentlet related\n+     * @throws DotDataException\n+     * @throws IOException\n+     * @throws DotSecurityException\n+     */\n+    @Test\n+    public void issue5197() throws DotDataException, IOException, DotSecurityException{\n+        WorkflowScheme ws = null;\n+        WorkflowStep step1 = null;\n+        WorkflowStep step2 = null;\n+        WorkflowAction action1 = null;\n+        WorkflowAction action2 = null;\n+        ContentType st = null;\n+        Contentlet contentlet1 = null;\n+\n+        try {\n+            User adminUser = APILocator.getUserAPI()\n+                    .loadByUserByEmail(\"admin@dotcms.com\", user, false);\n+            Role role = roleAPI.getUserRole(adminUser);\n+\n+            User anonymousUser = APILocator.getUserAPI().getAnonymousUser();\n+            Role anonymousRole = roleAPI.getUserRole(anonymousUser);\n+\n+\t\t    /*\n+\t\t     * Create workflow scheme\n+\t\t     */\n+            String schemeName = \"issue5197-\" + UtilMethods.dateToHTMLDate(new Date(), \"MM-dd-yyyy-HHmmss\");\n+            addWorkflowScheme(schemeName);\n+\n+            ws = workflowAPI.findSchemeByName(schemeName);\n+            Assert.assertTrue(UtilMethods.isSet(ws));\n+\n+            /*\n+\t\t     * Create scheme step1\n+\t\t     */\n+            addWorkflowStep(\"Edit\", 1, false, false, ws.getId());\n+\n+            List<WorkflowStep> steps = workflowAPI.findSteps(ws);\n+            Assert.assertTrue(steps.size() == 1);\n+            step1 = steps.get(0);\n+\n+            /*\n+\t\t     * Create scheme step2\n+\t\t     */\n+            addWorkflowStep(\"Publish\", 2, true, false, ws.getId());\n+            steps = workflowAPI.findSteps(ws);\n+            Assert.assertTrue(steps.size() == 2);\n+            step2 = steps.get(1);\n+\n+            /*\n+\t\t     * Add action to scheme step1\n+\t\t     */\n+            addWorkflowAction(\"Edit\", 1,\n+                    step2.getId(), false, step1.getId(), anonymousRole,\n+                    ws.getId());\n+\n+            List<WorkflowAction> actions1 = workflowAPI.findActions(step1, user);\n+            Assert.assertTrue(actions1.size() == 1);","path":"dotCMS/src/integration-test/java/com/dotmarketing/portlets/workflows/business/WorkflowAPITest.java","position":95,"original_position":95,"commit_id":"c6dd41ad6368c9438c0546e790a6afc613324f78","original_commit_id":"c6dd41ad6368c9438c0546e790a6afc613324f78","user":{"login":"codacy-bot","id":19940114,"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: [Unnecessary use of fully qualified name 'Assert.assertTrue' due to existing static import 'org.junit.Assert.*'](https://app.codacy.com/app/dotCMS/core/pullRequest?prid=1308788)","created_at":"2018-02-06T19:56:13Z","updated_at":"2018-02-06T19:56:13Z","html_url":"https://github.com/dotCMS/core/pull/13580#discussion_r166424943","pull_request_url":"https://api.github.com/repos/dotCMS/core/pulls/13580","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core/pulls/comments/166424943"},"html":{"href":"https://github.com/dotCMS/core/pull/13580#discussion_r166424943"},"pull_request":{"href":"https://api.github.com/repos/dotCMS/core/pulls/13580"}}},"pull_request":{"url":"https://api.github.com/repos/dotCMS/core/pulls/13580","id":167511289,"html_url":"https://github.com/dotCMS/core/pull/13580","diff_url":"https://github.com/dotCMS/core/pull/13580.diff","patch_url":"https://github.com/dotCMS/core/pull/13580.patch","issue_url":"https://api.github.com/repos/dotCMS/core/issues/13580","number":13580,"state":"open","locked":false,"title":"Issue13303 remove mandatory workflow fixes","user":{"login":"oswaldogallango","id":1569280,"avatar_url":"https://avatars2.githubusercontent.com/u/1569280?v=4","gravatar_id":"","url":"https://api.github.com/users/oswaldogallango","html_url":"https://github.com/oswaldogallango","followers_url":"https://api.github.com/users/oswaldogallango/followers","following_url":"https://api.github.com/users/oswaldogallango/following{/other_user}","gists_url":"https://api.github.com/users/oswaldogallango/gists{/gist_id}","starred_url":"https://api.github.com/users/oswaldogallango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oswaldogallango/subscriptions","organizations_url":"https://api.github.com/users/oswaldogallango/orgs","repos_url":"https://api.github.com/users/oswaldogallango/repos","events_url":"https://api.github.com/users/oswaldogallango/events{/privacy}","received_events_url":"https://api.github.com/users/oswaldogallango/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-06T19:44:09Z","updated_at":"2018-02-06T19:56:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0459d9e9450f20d5521b655d07577366a059e89","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/dotCMS/core/pulls/13580/commits","review_comments_url":"https://api.github.com/repos/dotCMS/core/pulls/13580/comments","review_comment_url":"https://api.github.com/repos/dotCMS/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotCMS/core/issues/13580/comments","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/c6dd41ad6368c9438c0546e790a6afc613324f78","head":{"label":"dotCMS:issue13303-remove-mandatory-workflow-fixes","ref":"issue13303-remove-mandatory-workflow-fixes","sha":"c6dd41ad6368c9438c0546e790a6afc613324f78","user":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":3729629,"name":"core","full_name":"dotCMS/core","owner":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotCMS/core","description":"Source Code for dotCMS Java Enterprise Content Management System","fork":false,"url":"https://api.github.com/repos/dotCMS/core","forks_url":"https://api.github.com/repos/dotCMS/core/forks","keys_url":"https://api.github.com/repos/dotCMS/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core/teams","hooks_url":"https://api.github.com/repos/dotCMS/core/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core/events","assignees_url":"https://api.github.com/repos/dotCMS/core/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core/tags","blobs_url":"https://api.github.com/repos/dotCMS/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core/subscription","commits_url":"https://api.github.com/repos/dotCMS/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core/merges","archive_url":"https://api.github.com/repos/dotCMS/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core/downloads","issues_url":"https://api.github.com/repos/dotCMS/core/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core/deployments","created_at":"2012-03-15T15:24:14Z","updated_at":"2018-02-04T02:40:23Z","pushed_at":"2018-02-06T19:44:10Z","git_url":"git://github.com/dotCMS/core.git","ssh_url":"git@github.com:dotCMS/core.git","clone_url":"https://github.com/dotCMS/core.git","svn_url":"https://github.com/dotCMS/core","homepage":"http://dotcms.com","size":298597,"stargazers_count":353,"watchers_count":353,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":1782,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":310,"open_issues":1782,"watchers":353,"default_branch":"master"}},"base":{"label":"dotCMS:master","ref":"master","sha":"208ca54b9c89b621a15a692416b3c68766ebf570","user":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":3729629,"name":"core","full_name":"dotCMS/core","owner":{"login":"dotCMS","id":1005263,"avatar_url":"https://avatars3.githubusercontent.com/u/1005263?v=4","gravatar_id":"","url":"https://api.github.com/users/dotCMS","html_url":"https://github.com/dotCMS","followers_url":"https://api.github.com/users/dotCMS/followers","following_url":"https://api.github.com/users/dotCMS/following{/other_user}","gists_url":"https://api.github.com/users/dotCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/dotCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotCMS/subscriptions","organizations_url":"https://api.github.com/users/dotCMS/orgs","repos_url":"https://api.github.com/users/dotCMS/repos","events_url":"https://api.github.com/users/dotCMS/events{/privacy}","received_events_url":"https://api.github.com/users/dotCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotCMS/core","description":"Source Code for dotCMS Java Enterprise Content Management System","fork":false,"url":"https://api.github.com/repos/dotCMS/core","forks_url":"https://api.github.com/repos/dotCMS/core/forks","keys_url":"https://api.github.com/repos/dotCMS/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotCMS/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotCMS/core/teams","hooks_url":"https://api.github.com/repos/dotCMS/core/hooks","issue_events_url":"https://api.github.com/repos/dotCMS/core/issues/events{/number}","events_url":"https://api.github.com/repos/dotCMS/core/events","assignees_url":"https://api.github.com/repos/dotCMS/core/assignees{/user}","branches_url":"https://api.github.com/repos/dotCMS/core/branches{/branch}","tags_url":"https://api.github.com/repos/dotCMS/core/tags","blobs_url":"https://api.github.com/repos/dotCMS/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotCMS/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotCMS/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotCMS/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotCMS/core/statuses/{sha}","languages_url":"https://api.github.com/repos/dotCMS/core/languages","stargazers_url":"https://api.github.com/repos/dotCMS/core/stargazers","contributors_url":"https://api.github.com/repos/dotCMS/core/contributors","subscribers_url":"https://api.github.com/repos/dotCMS/core/subscribers","subscription_url":"https://api.github.com/repos/dotCMS/core/subscription","commits_url":"https://api.github.com/repos/dotCMS/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotCMS/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotCMS/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotCMS/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotCMS/core/contents/{+path}","compare_url":"https://api.github.com/repos/dotCMS/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotCMS/core/merges","archive_url":"https://api.github.com/repos/dotCMS/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotCMS/core/downloads","issues_url":"https://api.github.com/repos/dotCMS/core/issues{/number}","pulls_url":"https://api.github.com/repos/dotCMS/core/pulls{/number}","milestones_url":"https://api.github.com/repos/dotCMS/core/milestones{/number}","notifications_url":"https://api.github.com/repos/dotCMS/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotCMS/core/labels{/name}","releases_url":"https://api.github.com/repos/dotCMS/core/releases{/id}","deployments_url":"https://api.github.com/repos/dotCMS/core/deployments","created_at":"2012-03-15T15:24:14Z","updated_at":"2018-02-04T02:40:23Z","pushed_at":"2018-02-06T19:44:10Z","git_url":"git://github.com/dotCMS/core.git","ssh_url":"git@github.com:dotCMS/core.git","clone_url":"https://github.com/dotCMS/core.git","svn_url":"https://github.com/dotCMS/core","homepage":"http://dotcms.com","size":298597,"stargazers_count":353,"watchers_count":353,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":310,"mirror_url":null,"archived":false,"open_issues_count":1782,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":310,"open_issues":1782,"watchers":353,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotCMS/core/pulls/13580"},"html":{"href":"https://github.com/dotCMS/core/pull/13580"},"issue":{"href":"https://api.github.com/repos/dotCMS/core/issues/13580"},"comments":{"href":"https://api.github.com/repos/dotCMS/core/issues/13580/comments"},"review_comments":{"href":"https://api.github.com/repos/dotCMS/core/pulls/13580/comments"},"review_comment":{"href":"https://api.github.com/repos/dotCMS/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotCMS/core/pulls/13580/commits"},"statuses":{"href":"https://api.github.com/repos/dotCMS/core/statuses/c6dd41ad6368c9438c0546e790a6afc613324f78"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}