{"action":"created","comment":{"url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/comments/241382858","pull_request_review_id":184630774,"id":241382858,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTM4Mjg1OA==","diff_hunk":"@@ -5,10 +5,63 @@\n \n from django import forms\n \n-from production import models\n+from production import models, logic\n \n \n class TypesetterNote(forms.ModelForm):\n     class Meta:\n         model = models.TypesetTask\n         fields = ('note_from_typesetter',)\n+\n+\n+class AssignTypesetter(forms.ModelForm):\n+\n+    def __init__(self, *args, **kwargs):\n+        self.files = kwargs.pop('files')\n+        self.article = kwargs.pop('article')\n+        self.typesetters = kwargs.pop('typesetters')\n+        self.assignment = kwargs.pop('assignment')\n+\n+        super(AssignTypesetter, self).__init__(*args, **kwargs)\n+\n+    class Meta:\n+        model = models.TypesetTask\n+        fields = (\n+            'typesetter',\n+            'files_for_typesetting',\n+            'typeset_task',\n+        )\n+\n+    def clean(self):\n+        cleaned_data = super().clean()\n+\n+        file_check = logic.check_posted_typesetter_files(\n+            self.article,\n+            self.files,\n+            cleaned_data.get('files_for_typesetting'),\n+        )\n+\n+        if not file_check:\n+            self.add_error(\n+                'files_for_typesetting',\n+                'File not found in files list.'\n+            )\n+\n+        if not cleaned_data.get('typesetter') in logic.typesetter_users(","path":"src/production/forms.py","position":47,"original_position":47,"commit_id":"9bbfe86702e1a33b21a4b79b16066c46b4c9bcb5","original_commit_id":"9bbfe86702e1a33b21a4b79b16066c46b4c9bcb5","user":{"login":"mauromsl","id":10760678,"node_id":"MDQ6VXNlcjEwNzYwNjc4","avatar_url":"https://avatars3.githubusercontent.com/u/10760678?v=4","gravatar_id":"","url":"https://api.github.com/users/mauromsl","html_url":"https://github.com/mauromsl","followers_url":"https://api.github.com/users/mauromsl/followers","following_url":"https://api.github.com/users/mauromsl/following{/other_user}","gists_url":"https://api.github.com/users/mauromsl/gists{/gist_id}","starred_url":"https://api.github.com/users/mauromsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauromsl/subscriptions","organizations_url":"https://api.github.com/users/mauromsl/orgs","repos_url":"https://api.github.com/users/mauromsl/repos","events_url":"https://api.github.com/users/mauromsl/events{/privacy}","received_events_url":"https://api.github.com/users/mauromsl/received_events","type":"User","site_admin":false},"body":"Just curious, how can we end up with a typesettter who is not a typesetter here?","created_at":"2018-12-13T12:34:51Z","updated_at":"2018-12-13T12:35:22Z","html_url":"https://github.com/BirkbeckCTP/janeway/pull/706#discussion_r241382858","pull_request_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/comments/241382858"},"html":{"href":"https://github.com/BirkbeckCTP/janeway/pull/706#discussion_r241382858"},"pull_request":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706"}}},"pull_request":{"url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706","id":238005074,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MDA1MDc0","html_url":"https://github.com/BirkbeckCTP/janeway/pull/706","diff_url":"https://github.com/BirkbeckCTP/janeway/pull/706.diff","patch_url":"https://github.com/BirkbeckCTP/janeway/pull/706.patch","issue_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/706","number":706,"state":"open","locked":false,"title":"Closes #635","user":{"login":"ajrbyers","id":8321378,"node_id":"MDQ6VXNlcjgzMjEzNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/8321378?v=4","gravatar_id":"","url":"https://api.github.com/users/ajrbyers","html_url":"https://github.com/ajrbyers","followers_url":"https://api.github.com/users/ajrbyers/followers","following_url":"https://api.github.com/users/ajrbyers/following{/other_user}","gists_url":"https://api.github.com/users/ajrbyers/gists{/gist_id}","starred_url":"https://api.github.com/users/ajrbyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajrbyers/subscriptions","organizations_url":"https://api.github.com/users/ajrbyers/orgs","repos_url":"https://api.github.com/users/ajrbyers/repos","events_url":"https://api.github.com/users/ajrbyers/events{/privacy}","received_events_url":"https://api.github.com/users/ajrbyers/received_events","type":"User","site_admin":false},"body":"Added a new form with validators and dropped custom form validator from logic.py.\r\n\r\nCloses #635 ","created_at":"2018-12-12T11:34:52Z","updated_at":"2018-12-13T12:35:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a78cf1ebea69d5ff570e63f94a8df46c9ee2ee64","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706/commits","review_comments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706/comments","review_comment_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/706/comments","statuses_url":"https://api.github.com/repos/BirkbeckCTP/janeway/statuses/9bbfe86702e1a33b21a4b79b16066c46b4c9bcb5","head":{"label":"BirkbeckCTP:635-bugfix_typesetter_form","ref":"635-bugfix_typesetter_form","sha":"9bbfe86702e1a33b21a4b79b16066c46b4c9bcb5","user":{"login":"BirkbeckCTP","id":17926709,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTI2NzA5","avatar_url":"https://avatars0.githubusercontent.com/u/17926709?v=4","gravatar_id":"","url":"https://api.github.com/users/BirkbeckCTP","html_url":"https://github.com/BirkbeckCTP","followers_url":"https://api.github.com/users/BirkbeckCTP/followers","following_url":"https://api.github.com/users/BirkbeckCTP/following{/other_user}","gists_url":"https://api.github.com/users/BirkbeckCTP/gists{/gist_id}","starred_url":"https://api.github.com/users/BirkbeckCTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BirkbeckCTP/subscriptions","organizations_url":"https://api.github.com/users/BirkbeckCTP/orgs","repos_url":"https://api.github.com/users/BirkbeckCTP/repos","events_url":"https://api.github.com/users/BirkbeckCTP/events{/privacy}","received_events_url":"https://api.github.com/users/BirkbeckCTP/received_events","type":"Organization","site_admin":false},"repo":{"id":96784832,"node_id":"MDEwOlJlcG9zaXRvcnk5Njc4NDgzMg==","name":"janeway","full_name":"BirkbeckCTP/janeway","private":false,"owner":{"login":"BirkbeckCTP","id":17926709,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTI2NzA5","avatar_url":"https://avatars0.githubusercontent.com/u/17926709?v=4","gravatar_id":"","url":"https://api.github.com/users/BirkbeckCTP","html_url":"https://github.com/BirkbeckCTP","followers_url":"https://api.github.com/users/BirkbeckCTP/followers","following_url":"https://api.github.com/users/BirkbeckCTP/following{/other_user}","gists_url":"https://api.github.com/users/BirkbeckCTP/gists{/gist_id}","starred_url":"https://api.github.com/users/BirkbeckCTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BirkbeckCTP/subscriptions","organizations_url":"https://api.github.com/users/BirkbeckCTP/orgs","repos_url":"https://api.github.com/users/BirkbeckCTP/repos","events_url":"https://api.github.com/users/BirkbeckCTP/events{/privacy}","received_events_url":"https://api.github.com/users/BirkbeckCTP/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BirkbeckCTP/janeway","description":"A journal management system designed for publishing scholarly articles.","fork":false,"url":"https://api.github.com/repos/BirkbeckCTP/janeway","forks_url":"https://api.github.com/repos/BirkbeckCTP/janeway/forks","keys_url":"https://api.github.com/repos/BirkbeckCTP/janeway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BirkbeckCTP/janeway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BirkbeckCTP/janeway/teams","hooks_url":"https://api.github.com/repos/BirkbeckCTP/janeway/hooks","issue_events_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/events{/number}","events_url":"https://api.github.com/repos/BirkbeckCTP/janeway/events","assignees_url":"https://api.github.com/repos/BirkbeckCTP/janeway/assignees{/user}","branches_url":"https://api.github.com/repos/BirkbeckCTP/janeway/branches{/branch}","tags_url":"https://api.github.com/repos/BirkbeckCTP/janeway/tags","blobs_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/refs{/sha}","trees_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BirkbeckCTP/janeway/statuses/{sha}","languages_url":"https://api.github.com/repos/BirkbeckCTP/janeway/languages","stargazers_url":"https://api.github.com/repos/BirkbeckCTP/janeway/stargazers","contributors_url":"https://api.github.com/repos/BirkbeckCTP/janeway/contributors","subscribers_url":"https://api.github.com/repos/BirkbeckCTP/janeway/subscribers","subscription_url":"https://api.github.com/repos/BirkbeckCTP/janeway/subscription","commits_url":"https://api.github.com/repos/BirkbeckCTP/janeway/commits{/sha}","git_commits_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/commits{/sha}","comments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/comments{/number}","issue_comment_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/comments{/number}","contents_url":"https://api.github.com/repos/BirkbeckCTP/janeway/contents/{+path}","compare_url":"https://api.github.com/repos/BirkbeckCTP/janeway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BirkbeckCTP/janeway/merges","archive_url":"https://api.github.com/repos/BirkbeckCTP/janeway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BirkbeckCTP/janeway/downloads","issues_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues{/number}","pulls_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls{/number}","milestones_url":"https://api.github.com/repos/BirkbeckCTP/janeway/milestones{/number}","notifications_url":"https://api.github.com/repos/BirkbeckCTP/janeway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BirkbeckCTP/janeway/labels{/name}","releases_url":"https://api.github.com/repos/BirkbeckCTP/janeway/releases{/id}","deployments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/deployments","created_at":"2017-07-10T14:08:53Z","updated_at":"2018-12-12T11:35:25Z","pushed_at":"2018-12-13T12:21:48Z","git_url":"git://github.com/BirkbeckCTP/janeway.git","ssh_url":"git@github.com:BirkbeckCTP/janeway.git","clone_url":"https://github.com/BirkbeckCTP/janeway.git","svn_url":"https://github.com/BirkbeckCTP/janeway","homepage":"","size":24126,"stargazers_count":65,"watchers_count":65,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":121,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":19,"open_issues":121,"watchers":65,"default_branch":"master"}},"base":{"label":"BirkbeckCTP:1.3.2","ref":"1.3.2","sha":"0a9c39c1ff8aedee0d99d048bb882e37de09f258","user":{"login":"BirkbeckCTP","id":17926709,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTI2NzA5","avatar_url":"https://avatars0.githubusercontent.com/u/17926709?v=4","gravatar_id":"","url":"https://api.github.com/users/BirkbeckCTP","html_url":"https://github.com/BirkbeckCTP","followers_url":"https://api.github.com/users/BirkbeckCTP/followers","following_url":"https://api.github.com/users/BirkbeckCTP/following{/other_user}","gists_url":"https://api.github.com/users/BirkbeckCTP/gists{/gist_id}","starred_url":"https://api.github.com/users/BirkbeckCTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BirkbeckCTP/subscriptions","organizations_url":"https://api.github.com/users/BirkbeckCTP/orgs","repos_url":"https://api.github.com/users/BirkbeckCTP/repos","events_url":"https://api.github.com/users/BirkbeckCTP/events{/privacy}","received_events_url":"https://api.github.com/users/BirkbeckCTP/received_events","type":"Organization","site_admin":false},"repo":{"id":96784832,"node_id":"MDEwOlJlcG9zaXRvcnk5Njc4NDgzMg==","name":"janeway","full_name":"BirkbeckCTP/janeway","private":false,"owner":{"login":"BirkbeckCTP","id":17926709,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3OTI2NzA5","avatar_url":"https://avatars0.githubusercontent.com/u/17926709?v=4","gravatar_id":"","url":"https://api.github.com/users/BirkbeckCTP","html_url":"https://github.com/BirkbeckCTP","followers_url":"https://api.github.com/users/BirkbeckCTP/followers","following_url":"https://api.github.com/users/BirkbeckCTP/following{/other_user}","gists_url":"https://api.github.com/users/BirkbeckCTP/gists{/gist_id}","starred_url":"https://api.github.com/users/BirkbeckCTP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BirkbeckCTP/subscriptions","organizations_url":"https://api.github.com/users/BirkbeckCTP/orgs","repos_url":"https://api.github.com/users/BirkbeckCTP/repos","events_url":"https://api.github.com/users/BirkbeckCTP/events{/privacy}","received_events_url":"https://api.github.com/users/BirkbeckCTP/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BirkbeckCTP/janeway","description":"A journal management system designed for publishing scholarly articles.","fork":false,"url":"https://api.github.com/repos/BirkbeckCTP/janeway","forks_url":"https://api.github.com/repos/BirkbeckCTP/janeway/forks","keys_url":"https://api.github.com/repos/BirkbeckCTP/janeway/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BirkbeckCTP/janeway/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BirkbeckCTP/janeway/teams","hooks_url":"https://api.github.com/repos/BirkbeckCTP/janeway/hooks","issue_events_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/events{/number}","events_url":"https://api.github.com/repos/BirkbeckCTP/janeway/events","assignees_url":"https://api.github.com/repos/BirkbeckCTP/janeway/assignees{/user}","branches_url":"https://api.github.com/repos/BirkbeckCTP/janeway/branches{/branch}","tags_url":"https://api.github.com/repos/BirkbeckCTP/janeway/tags","blobs_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/refs{/sha}","trees_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BirkbeckCTP/janeway/statuses/{sha}","languages_url":"https://api.github.com/repos/BirkbeckCTP/janeway/languages","stargazers_url":"https://api.github.com/repos/BirkbeckCTP/janeway/stargazers","contributors_url":"https://api.github.com/repos/BirkbeckCTP/janeway/contributors","subscribers_url":"https://api.github.com/repos/BirkbeckCTP/janeway/subscribers","subscription_url":"https://api.github.com/repos/BirkbeckCTP/janeway/subscription","commits_url":"https://api.github.com/repos/BirkbeckCTP/janeway/commits{/sha}","git_commits_url":"https://api.github.com/repos/BirkbeckCTP/janeway/git/commits{/sha}","comments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/comments{/number}","issue_comment_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/comments{/number}","contents_url":"https://api.github.com/repos/BirkbeckCTP/janeway/contents/{+path}","compare_url":"https://api.github.com/repos/BirkbeckCTP/janeway/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BirkbeckCTP/janeway/merges","archive_url":"https://api.github.com/repos/BirkbeckCTP/janeway/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BirkbeckCTP/janeway/downloads","issues_url":"https://api.github.com/repos/BirkbeckCTP/janeway/issues{/number}","pulls_url":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls{/number}","milestones_url":"https://api.github.com/repos/BirkbeckCTP/janeway/milestones{/number}","notifications_url":"https://api.github.com/repos/BirkbeckCTP/janeway/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BirkbeckCTP/janeway/labels{/name}","releases_url":"https://api.github.com/repos/BirkbeckCTP/janeway/releases{/id}","deployments_url":"https://api.github.com/repos/BirkbeckCTP/janeway/deployments","created_at":"2017-07-10T14:08:53Z","updated_at":"2018-12-12T11:35:25Z","pushed_at":"2018-12-13T12:21:48Z","git_url":"git://github.com/BirkbeckCTP/janeway.git","ssh_url":"git@github.com:BirkbeckCTP/janeway.git","clone_url":"https://github.com/BirkbeckCTP/janeway.git","svn_url":"https://github.com/BirkbeckCTP/janeway","homepage":"","size":24126,"stargazers_count":65,"watchers_count":65,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":121,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":19,"open_issues":121,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706"},"html":{"href":"https://github.com/BirkbeckCTP/janeway/pull/706"},"issue":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/706"},"comments":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/issues/706/comments"},"review_comments":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706/comments"},"review_comment":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/pulls/706/commits"},"statuses":{"href":"https://api.github.com/repos/BirkbeckCTP/janeway/statuses/9bbfe86702e1a33b21a4b79b16066c46b4c9bcb5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mauromsl"}}