{"action":"created","comment":{"url":"https://api.github.com/repos/indico/indico/pulls/comments/84649700","pull_request_review_id":5412981,"id":84649700,"diff_hunk":"@@ -146,19 +146,46 @@ class AbstractJudgmentForm(IndicoForm):\n     session = QuerySelectField(_(\"Session\"), [HiddenUnless('judgment', AbstractAction.accept)],\n                                get_label='title', allow_blank=True, blank_text=_(\"Choose a session...\"),\n                                description=_(\"The generated contribution will be allocated in this session\"))\n+    duplicate_of = AbstractField(_(\"Duplicate of\"),\n+                                 [HiddenUnless('judgment', AbstractAction.mark_as_duplicate), DataRequired()],\n+                                 description=_(\"The current abstract will be marked as duplicate of the selected one\"))\n     merged_into = AbstractField(_(\"Merge into\"), [HiddenUnless('judgment', AbstractAction.merge), DataRequired()],\n                                 description=_(\"The current abstract will be merged onto the selected one\"))\n-    merge_persons = BooleanField(_(\"Merge persons\"), [HiddenUnless('judgment', AbstractAction.merge), DataRequired()],\n+    merge_persons = BooleanField(_(\"Merge persons\"), [HiddenUnless('judgment', AbstractAction.merge)],\n                                  description=_(\"Authors and speakers of the current abstract will be added to the \"\n                                                \"selected one\"))\n-    duplicate_of = AbstractField(_(\"Duplicate of\"),\n-                                 [HiddenUnless('judgment', AbstractAction.mark_as_duplicate), DataRequired()],\n-                                 description=_(\"The current abstract will be marked as duplicate of the selected one\"))\n     judgment_comment = TextAreaField(_(\"Comment\"), render_kw={'placeholder': _(\"Leave a comment for the submitter...\")})\n     # TODO: show only if notifications apply?\n     send_notifications = BooleanField(_(\"Send notifications to submitter\"), default=True)\n \n     def __init__(self, *args, **kwargs):\n+        super(AbstractJudgmentFormBase, self).__init__(*args, **kwargs)\n+        self.session.query = Session.query.with_parent(self.event).order_by(Session.title)\n+        self.accepted_track.query = Track.query.with_parent(self.event).order_by(Track.title)\n+        self.accepted_contrib_type.query = (ContributionType.query\n+                                            .with_parent(self.event)\n+                                            .order_by(ContributionType.name))\n+\n+    @property\n+    def split_data(self):\n+        abstract_data = self.data\n+        judgment = abstract_data.pop('judgment')\n+        special_data = {\n+            'judgment': judgment if judgment else AbstractAction[request.form['judgment']],","path":"indico/modules/events/abstracts/forms.py","position":70,"original_position":70,"commit_id":"d933a3947ffcc4ecff0f3128e0279577d2d58c04","original_commit_id":"d933a3947ffcc4ecff0f3128e0279577d2d58c04","user":{"login":"ThiefMaster","id":179599,"avatar_url":"https://avatars.githubusercontent.com/u/179599?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiefMaster","html_url":"https://github.com/ThiefMaster","followers_url":"https://api.github.com/users/ThiefMaster/followers","following_url":"https://api.github.com/users/ThiefMaster/following{/other_user}","gists_url":"https://api.github.com/users/ThiefMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiefMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiefMaster/subscriptions","organizations_url":"https://api.github.com/users/ThiefMaster/orgs","repos_url":"https://api.github.com/users/ThiefMaster/repos","events_url":"https://api.github.com/users/ThiefMaster/events{/privacy}","received_events_url":"https://api.github.com/users/ThiefMaster/received_events","type":"User","site_admin":false},"body":"`judgment or AbstractAction[request.form['judgment']]`\r\n\r\nGetting it through request.form is not very pretty btw. Doesn't it work if you use `self.judgment.data`?","created_at":"2016-10-24T09:28:17Z","updated_at":"2016-10-24T09:28:17Z","html_url":"https://github.com/indico/indico/pull/2656#discussion_r84649700","pull_request_url":"https://api.github.com/repos/indico/indico/pulls/2656","_links":{"self":{"href":"https://api.github.com/repos/indico/indico/pulls/comments/84649700"},"html":{"href":"https://github.com/indico/indico/pull/2656#discussion_r84649700"},"pull_request":{"href":"https://api.github.com/repos/indico/indico/pulls/2656"}}},"pull_request":{"url":"https://api.github.com/repos/indico/indico/pulls/2656","id":90178858,"html_url":"https://github.com/indico/indico/pull/2656","diff_url":"https://github.com/indico/indico/pull/2656.diff","patch_url":"https://github.com/indico/indico/pull/2656.patch","issue_url":"https://api.github.com/repos/indico/indico/issues/2656","number":2656,"state":"open","locked":false,"title":"Bulk abstract judgment actions","user":{"login":"nop33","id":1579899,"avatar_url":"https://avatars.githubusercontent.com/u/1579899?v=3","gravatar_id":"","url":"https://api.github.com/users/nop33","html_url":"https://github.com/nop33","followers_url":"https://api.github.com/users/nop33/followers","following_url":"https://api.github.com/users/nop33/following{/other_user}","gists_url":"https://api.github.com/users/nop33/gists{/gist_id}","starred_url":"https://api.github.com/users/nop33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nop33/subscriptions","organizations_url":"https://api.github.com/users/nop33/orgs","repos_url":"https://api.github.com/users/nop33/repos","events_url":"https://api.github.com/users/nop33/events{/privacy}","received_events_url":"https://api.github.com/users/nop33/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-20T11:08:42Z","updated_at":"2016-10-24T09:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3217f02beb224644edd5e7fa99b336d99fa6533","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/indico/indico/pulls/2656/commits","review_comments_url":"https://api.github.com/repos/indico/indico/pulls/2656/comments","review_comment_url":"https://api.github.com/repos/indico/indico/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indico/indico/issues/2656/comments","statuses_url":"https://api.github.com/repos/indico/indico/statuses/d933a3947ffcc4ecff0f3128e0279577d2d58c04","head":{"label":"nop33:wip/bulk-judgment-actions","ref":"wip/bulk-judgment-actions","sha":"d933a3947ffcc4ecff0f3128e0279577d2d58c04","user":{"login":"nop33","id":1579899,"avatar_url":"https://avatars.githubusercontent.com/u/1579899?v=3","gravatar_id":"","url":"https://api.github.com/users/nop33","html_url":"https://github.com/nop33","followers_url":"https://api.github.com/users/nop33/followers","following_url":"https://api.github.com/users/nop33/following{/other_user}","gists_url":"https://api.github.com/users/nop33/gists{/gist_id}","starred_url":"https://api.github.com/users/nop33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nop33/subscriptions","organizations_url":"https://api.github.com/users/nop33/orgs","repos_url":"https://api.github.com/users/nop33/repos","events_url":"https://api.github.com/users/nop33/events{/privacy}","received_events_url":"https://api.github.com/users/nop33/received_events","type":"User","site_admin":false},"repo":{"id":22684703,"name":"indico","full_name":"nop33/indico","owner":{"login":"nop33","id":1579899,"avatar_url":"https://avatars.githubusercontent.com/u/1579899?v=3","gravatar_id":"","url":"https://api.github.com/users/nop33","html_url":"https://github.com/nop33","followers_url":"https://api.github.com/users/nop33/followers","following_url":"https://api.github.com/users/nop33/following{/other_user}","gists_url":"https://api.github.com/users/nop33/gists{/gist_id}","starred_url":"https://api.github.com/users/nop33/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nop33/subscriptions","organizations_url":"https://api.github.com/users/nop33/orgs","repos_url":"https://api.github.com/users/nop33/repos","events_url":"https://api.github.com/users/nop33/events{/privacy}","received_events_url":"https://api.github.com/users/nop33/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nop33/indico","description":"The Indico Project (mirror)","fork":true,"url":"https://api.github.com/repos/nop33/indico","forks_url":"https://api.github.com/repos/nop33/indico/forks","keys_url":"https://api.github.com/repos/nop33/indico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nop33/indico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nop33/indico/teams","hooks_url":"https://api.github.com/repos/nop33/indico/hooks","issue_events_url":"https://api.github.com/repos/nop33/indico/issues/events{/number}","events_url":"https://api.github.com/repos/nop33/indico/events","assignees_url":"https://api.github.com/repos/nop33/indico/assignees{/user}","branches_url":"https://api.github.com/repos/nop33/indico/branches{/branch}","tags_url":"https://api.github.com/repos/nop33/indico/tags","blobs_url":"https://api.github.com/repos/nop33/indico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nop33/indico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nop33/indico/git/refs{/sha}","trees_url":"https://api.github.com/repos/nop33/indico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nop33/indico/statuses/{sha}","languages_url":"https://api.github.com/repos/nop33/indico/languages","stargazers_url":"https://api.github.com/repos/nop33/indico/stargazers","contributors_url":"https://api.github.com/repos/nop33/indico/contributors","subscribers_url":"https://api.github.com/repos/nop33/indico/subscribers","subscription_url":"https://api.github.com/repos/nop33/indico/subscription","commits_url":"https://api.github.com/repos/nop33/indico/commits{/sha}","git_commits_url":"https://api.github.com/repos/nop33/indico/git/commits{/sha}","comments_url":"https://api.github.com/repos/nop33/indico/comments{/number}","issue_comment_url":"https://api.github.com/repos/nop33/indico/issues/comments{/number}","contents_url":"https://api.github.com/repos/nop33/indico/contents/{+path}","compare_url":"https://api.github.com/repos/nop33/indico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nop33/indico/merges","archive_url":"https://api.github.com/repos/nop33/indico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nop33/indico/downloads","issues_url":"https://api.github.com/repos/nop33/indico/issues{/number}","pulls_url":"https://api.github.com/repos/nop33/indico/pulls{/number}","milestones_url":"https://api.github.com/repos/nop33/indico/milestones{/number}","notifications_url":"https://api.github.com/repos/nop33/indico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nop33/indico/labels{/name}","releases_url":"https://api.github.com/repos/nop33/indico/releases{/id}","deployments_url":"https://api.github.com/repos/nop33/indico/deployments","created_at":"2014-08-06T14:02:24Z","updated_at":"2016-04-14T12:41:26Z","pushed_at":"2016-10-24T09:04:38Z","git_url":"git://github.com/nop33/indico.git","ssh_url":"git@github.com:nop33/indico.git","clone_url":"https://github.com/nop33/indico.git","svn_url":"https://github.com/nop33/indico","homepage":"http://indico-software.org","size":189465,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"devel"}},"base":{"label":"indico:devel","ref":"devel","sha":"4e715e6947e6d97c22358b92e9e863de8fcab2dd","user":{"login":"indico","id":715236,"avatar_url":"https://avatars.githubusercontent.com/u/715236?v=3","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"repo":{"id":2113067,"name":"indico","full_name":"indico/indico","owner":{"login":"indico","id":715236,"avatar_url":"https://avatars.githubusercontent.com/u/715236?v=3","gravatar_id":"","url":"https://api.github.com/users/indico","html_url":"https://github.com/indico","followers_url":"https://api.github.com/users/indico/followers","following_url":"https://api.github.com/users/indico/following{/other_user}","gists_url":"https://api.github.com/users/indico/gists{/gist_id}","starred_url":"https://api.github.com/users/indico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indico/subscriptions","organizations_url":"https://api.github.com/users/indico/orgs","repos_url":"https://api.github.com/users/indico/repos","events_url":"https://api.github.com/users/indico/events{/privacy}","received_events_url":"https://api.github.com/users/indico/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indico/indico","description":"The Indico Project","fork":false,"url":"https://api.github.com/repos/indico/indico","forks_url":"https://api.github.com/repos/indico/indico/forks","keys_url":"https://api.github.com/repos/indico/indico/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indico/indico/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indico/indico/teams","hooks_url":"https://api.github.com/repos/indico/indico/hooks","issue_events_url":"https://api.github.com/repos/indico/indico/issues/events{/number}","events_url":"https://api.github.com/repos/indico/indico/events","assignees_url":"https://api.github.com/repos/indico/indico/assignees{/user}","branches_url":"https://api.github.com/repos/indico/indico/branches{/branch}","tags_url":"https://api.github.com/repos/indico/indico/tags","blobs_url":"https://api.github.com/repos/indico/indico/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indico/indico/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indico/indico/git/refs{/sha}","trees_url":"https://api.github.com/repos/indico/indico/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indico/indico/statuses/{sha}","languages_url":"https://api.github.com/repos/indico/indico/languages","stargazers_url":"https://api.github.com/repos/indico/indico/stargazers","contributors_url":"https://api.github.com/repos/indico/indico/contributors","subscribers_url":"https://api.github.com/repos/indico/indico/subscribers","subscription_url":"https://api.github.com/repos/indico/indico/subscription","commits_url":"https://api.github.com/repos/indico/indico/commits{/sha}","git_commits_url":"https://api.github.com/repos/indico/indico/git/commits{/sha}","comments_url":"https://api.github.com/repos/indico/indico/comments{/number}","issue_comment_url":"https://api.github.com/repos/indico/indico/issues/comments{/number}","contents_url":"https://api.github.com/repos/indico/indico/contents/{+path}","compare_url":"https://api.github.com/repos/indico/indico/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indico/indico/merges","archive_url":"https://api.github.com/repos/indico/indico/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indico/indico/downloads","issues_url":"https://api.github.com/repos/indico/indico/issues{/number}","pulls_url":"https://api.github.com/repos/indico/indico/pulls{/number}","milestones_url":"https://api.github.com/repos/indico/indico/milestones{/number}","notifications_url":"https://api.github.com/repos/indico/indico/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indico/indico/labels{/name}","releases_url":"https://api.github.com/repos/indico/indico/releases{/id}","deployments_url":"https://api.github.com/repos/indico/indico/deployments","created_at":"2011-07-27T13:56:30Z","updated_at":"2016-10-08T05:41:48Z","pushed_at":"2016-10-24T09:04:38Z","git_url":"git://github.com/indico/indico.git","ssh_url":"git@github.com:indico/indico.git","clone_url":"https://github.com/indico/indico.git","svn_url":"https://github.com/indico/indico","homepage":"http://indico-software.org","size":203304,"stargazers_count":165,"watchers_count":165,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":624,"forks":81,"open_issues":624,"watchers":165,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/indico/indico/pulls/2656"},"html":{"href":"https://github.com/indico/indico/pull/2656"},"issue":{"href":"https://api.github.com/repos/indico/indico/issues/2656"},"comments":{"href":"https://api.github.com/repos/indico/indico/issues/2656/comments"},"review_comments":{"href":"https://api.github.com/repos/indico/indico/pulls/2656/comments"},"review_comment":{"href":"https://api.github.com/repos/indico/indico/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indico/indico/pulls/2656/commits"},"statuses":{"href":"https://api.github.com/repos/indico/indico/statuses/d933a3947ffcc4ecff0f3128e0279577d2d58c04"}}}}
{"actor":{"display_login":"ThiefMaster"}}