{"action":"created","comment":{"url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments/23384152","id":23384152,"diff_hunk":"@@ -15,57 +15,47 @@ class DossierDeactivateView(grok.View):\n     grok.require('zope2.View')\n \n     def render(self):\n+        if not self.check_preconditions():\n+            return self.redirect()\n \n-        wft = getToolByName(self.context, 'portal_workflow')\n-        # check for resolved subdossiers\n-        for subdossier in self.context.get_subdossiers():\n-\n-            if wft.getInfoFor(subdossier.getObject(), 'review_state') \\\n-                    == 'dossier-state-resolved':\n-                IStatusMessage(self.request).add(\n-                    _(\"The Dossier can't be deactivated, the subdossier \"\n-                      \"${dossier} is already resolved\",\n-                      mapping=dict(dossier=subdossier.Title.decode('utf-8'),)),\n-                    type='error')\n-                return self.request.RESPONSE.redirect(\n-                    self.context.absolute_url())\n-\n-        # recursively resolve all dossier\n+        # recursively deactivate all dossier","path":"opengever/dossier/deactivate.py","position":33,"original_position":33,"commit_id":"722fc7925a7f2373b965868fd478cacd304c0531","original_commit_id":"722fc7925a7f2373b965868fd478cacd304c0531","user":{"login":"deiferni","id":736583,"avatar_url":"https://avatars.githubusercontent.com/u/736583?v=3","gravatar_id":"","url":"https://api.github.com/users/deiferni","html_url":"https://github.com/deiferni","followers_url":"https://api.github.com/users/deiferni/followers","following_url":"https://api.github.com/users/deiferni/following{/other_user}","gists_url":"https://api.github.com/users/deiferni/gists{/gist_id}","starred_url":"https://api.github.com/users/deiferni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deiferni/subscriptions","organizations_url":"https://api.github.com/users/deiferni/orgs","repos_url":"https://api.github.com/users/deiferni/repos","events_url":"https://api.github.com/users/deiferni/events{/privacy}","received_events_url":"https://api.github.com/users/deiferni/received_events","type":"User","site_admin":false},"body":"dossier -> dossiers","created_at":"2015-01-22T15:45:52Z","updated_at":"2015-01-22T15:45:52Z","html_url":"https://github.com/4teamwork/opengever.core/pull/732#discussion_r23384152","pull_request_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732","_links":{"self":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments/23384152"},"html":{"href":"https://github.com/4teamwork/opengever.core/pull/732#discussion_r23384152"},"pull_request":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732"}}},"pull_request":{"url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732","id":27776838,"html_url":"https://github.com/4teamwork/opengever.core/pull/732","diff_url":"https://github.com/4teamwork/opengever.core/pull/732.diff","patch_url":"https://github.com/4teamwork/opengever.core/pull/732.patch","issue_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/732","number":732,"state":"open","locked":false,"title":"Reworked and fixed dossier deactivation and activation","user":{"login":"phgross","id":485755,"avatar_url":"https://avatars.githubusercontent.com/u/485755?v=3","gravatar_id":"","url":"https://api.github.com/users/phgross","html_url":"https://github.com/phgross","followers_url":"https://api.github.com/users/phgross/followers","following_url":"https://api.github.com/users/phgross/following{/other_user}","gists_url":"https://api.github.com/users/phgross/gists{/gist_id}","starred_url":"https://api.github.com/users/phgross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phgross/subscriptions","organizations_url":"https://api.github.com/users/phgross/orgs","repos_url":"https://api.github.com/users/phgross/repos","events_url":"https://api.github.com/users/phgross/events{/privacy}","received_events_url":"https://api.github.com/users/phgross/received_events","type":"User","site_admin":false},"body":"Reworked and fixed dossier deactivation:\r\n - Add precondition checks for not checked_in documents (fixes Issue #689 )\r\n - Extend tests\r\n - Refactoring and cleanup (plone.api, splitting up ect.).\r\n\r\n@lukasgraf @deiferni please have a look","created_at":"2015-01-21T17:10:35Z","updated_at":"2015-01-22T15:45:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4e1865f492fbdd480b7e7b8c979570825ead6a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732/commits","review_comments_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732/comments","review_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments/{number}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/732/comments","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/722fc7925a7f2373b965868fd478cacd304c0531","head":{"label":"4teamwork:pg_fix_689","ref":"pg_fix_689","sha":"722fc7925a7f2373b965868fd478cacd304c0531","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":9788097,"name":"opengever.core","full_name":"4teamwork/opengever.core","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/opengever.core","description":"","fork":false,"url":"https://api.github.com/repos/4teamwork/opengever.core","forks_url":"https://api.github.com/repos/4teamwork/opengever.core/forks","keys_url":"https://api.github.com/repos/4teamwork/opengever.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/opengever.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/opengever.core/teams","hooks_url":"https://api.github.com/repos/4teamwork/opengever.core/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/opengever.core/events","assignees_url":"https://api.github.com/repos/4teamwork/opengever.core/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/opengever.core/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/opengever.core/tags","blobs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/opengever.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/opengever.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/opengever.core/languages","stargazers_url":"https://api.github.com/repos/4teamwork/opengever.core/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/opengever.core/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/opengever.core/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/opengever.core/subscription","commits_url":"https://api.github.com/repos/4teamwork/opengever.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/opengever.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/comments/{number}","contents_url":"https://api.github.com/repos/4teamwork/opengever.core/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/opengever.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/opengever.core/merges","archive_url":"https://api.github.com/repos/4teamwork/opengever.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/opengever.core/downloads","issues_url":"https://api.github.com/repos/4teamwork/opengever.core/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/opengever.core/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/opengever.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/opengever.core/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/opengever.core/releases{/id}","created_at":"2013-05-01T08:28:16Z","updated_at":"2015-01-21T15:35:21Z","pushed_at":"2015-01-22T15:20:15Z","git_url":"git://github.com/4teamwork/opengever.core.git","ssh_url":"git@github.com:4teamwork/opengever.core.git","clone_url":"https://github.com/4teamwork/opengever.core.git","svn_url":"https://github.com/4teamwork/opengever.core","homepage":"","size":23690,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":73,"forks":3,"open_issues":73,"watchers":5,"default_branch":"master"}},"base":{"label":"4teamwork:master","ref":"master","sha":"a4592187cf90102f95de865a492780e7ee687505","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":9788097,"name":"opengever.core","full_name":"4teamwork/opengever.core","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/opengever.core","description":"","fork":false,"url":"https://api.github.com/repos/4teamwork/opengever.core","forks_url":"https://api.github.com/repos/4teamwork/opengever.core/forks","keys_url":"https://api.github.com/repos/4teamwork/opengever.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/opengever.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/opengever.core/teams","hooks_url":"https://api.github.com/repos/4teamwork/opengever.core/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/opengever.core/events","assignees_url":"https://api.github.com/repos/4teamwork/opengever.core/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/opengever.core/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/opengever.core/tags","blobs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/opengever.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/opengever.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/opengever.core/languages","stargazers_url":"https://api.github.com/repos/4teamwork/opengever.core/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/opengever.core/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/opengever.core/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/opengever.core/subscription","commits_url":"https://api.github.com/repos/4teamwork/opengever.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/opengever.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/comments/{number}","contents_url":"https://api.github.com/repos/4teamwork/opengever.core/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/opengever.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/opengever.core/merges","archive_url":"https://api.github.com/repos/4teamwork/opengever.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/opengever.core/downloads","issues_url":"https://api.github.com/repos/4teamwork/opengever.core/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/opengever.core/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/opengever.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/opengever.core/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/opengever.core/releases{/id}","created_at":"2013-05-01T08:28:16Z","updated_at":"2015-01-21T15:35:21Z","pushed_at":"2015-01-22T15:20:15Z","git_url":"git://github.com/4teamwork/opengever.core.git","ssh_url":"git@github.com:4teamwork/opengever.core.git","clone_url":"https://github.com/4teamwork/opengever.core.git","svn_url":"https://github.com/4teamwork/opengever.core","homepage":"","size":23690,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":73,"forks":3,"open_issues":73,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732"},"html":{"href":"https://github.com/4teamwork/opengever.core/pull/732"},"issue":{"href":"https://api.github.com/repos/4teamwork/opengever.core/issues/732"},"comments":{"href":"https://api.github.com/repos/4teamwork/opengever.core/issues/732/comments"},"review_comments":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732/comments"},"review_comment":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/732/commits"},"statuses":{"href":"https://api.github.com/repos/4teamwork/opengever.core/statuses/722fc7925a7f2373b965868fd478cacd304c0531"}}}}