{"action":"created","comment":{"url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/comments/79807561","id":79807561,"diff_hunk":"@@ -310,79 +310,17 @@ angular.module('OpenSlidesApp.motions', [\n     'operator',\n     function (Config, operator) {\n         return {\n-            getFields: function () {\n-                // Take input from config field and parse it. It can be some\n-                // JSON or just a comma separated list of strings.\n-                //\n-                // The result is an array of objects. Each object contains\n-                // at least the name of the comment field See configSchema.\n-                //\n-                // Attention: This code does also exist on server side.\n-                var configSchema = {\n-                    $schema: \"http://json-schema.org/draft-04/schema#\",\n-                    title: \"Motion Comments\",\n-                    type: \"array\",\n-                    items: {\n-                        type: \"object\",\n-                        properties: {\n-                            name: {\n-                                type: \"string\",\n-                                minLength: 1\n-                            },\n-                            public: {\n-                                type: \"boolean\"\n-                            },\n-                            forRecommendation: {\n-                                type: \"boolean\"\n-                            },\n-                            forState: {\n-                                type: \"boolean\"\n-                            }\n-                        },\n-                        required: [\"name\"]\n-                    },\n-                    minItems: 1,\n-                    uniqueItems: true\n-                };\n-                var configValue = Config.get('motions_comments').value;\n-                var fields;\n-                var isJSON = true;\n-                try {\n-                    fields = JSON.parse(configValue);\n-                } catch (err) {\n-                    isJSON = false;\n-                }\n-                if (isJSON) {\n-                    // Config is JSON. Validate it.\n-                    if (!jsen(configSchema)(fields)) {\n-                        fields = [];\n-                    }\n-                } else {\n-                    // Config is a comma separated list of strings. Strip out\n-                    // empty parts. All valid strings lead to public comment\n-                    // fields.\n-                    fields = _.map(\n-                        _.filter(\n-                            configValue.split(','),\n-                            function (name) {\n-                                return name;\n-                            }),\n-                        function (name) {\n-                            return {\n-                                'name': name,\n-                                'public': true\n-                            };\n-                        }\n-                    );\n-                }\n-                return fields;\n-            },\n             getFormFields: function () {\n-                var fields = this.getFields();\n+                var fields = Config.get('motions_comments').value;","path":"openslides/motions/static/js/motions/base.js","position":73,"original_position":73,"commit_id":"0f42bbc18497d08421d4f669c3fe0fbdb9ec5051","original_commit_id":"0f42bbc18497d08421d4f669c3fe0fbdb9ec5051","user":{"login":"normanjaeckel","id":2073844,"avatar_url":"https://avatars.githubusercontent.com/u/2073844?v=3","gravatar_id":"","url":"https://api.github.com/users/normanjaeckel","html_url":"https://github.com/normanjaeckel","followers_url":"https://api.github.com/users/normanjaeckel/followers","following_url":"https://api.github.com/users/normanjaeckel/following{/other_user}","gists_url":"https://api.github.com/users/normanjaeckel/gists{/gist_id}","starred_url":"https://api.github.com/users/normanjaeckel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanjaeckel/subscriptions","organizations_url":"https://api.github.com/users/normanjaeckel/orgs","repos_url":"https://api.github.com/users/normanjaeckel/repos","events_url":"https://api.github.com/users/normanjaeckel/events{/privacy}","received_events_url":"https://api.github.com/users/normanjaeckel/received_events","type":"User","site_admin":false},"body":"This check is not necessary. A non authorized user is not allowed to edit any comment field.","created_at":"2016-09-21T10:58:13Z","updated_at":"2016-09-21T10:58:43Z","html_url":"https://github.com/OpenSlides/OpenSlides/pull/2380#discussion_r79807561","pull_request_url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380","_links":{"self":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/comments/79807561"},"html":{"href":"https://github.com/OpenSlides/OpenSlides/pull/2380#discussion_r79807561"},"pull_request":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380"}}},"pull_request":{"url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380","id":84998827,"html_url":"https://github.com/OpenSlides/OpenSlides/pull/2380","diff_url":"https://github.com/OpenSlides/OpenSlides/pull/2380.diff","patch_url":"https://github.com/OpenSlides/OpenSlides/pull/2380.patch","issue_url":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/2380","number":2380,"state":"open","locked":false,"title":"New ui element for comments in config (closes #2348)","user":{"login":"FinnStutzenstein","id":8439581,"avatar_url":"https://avatars.githubusercontent.com/u/8439581?v=3","gravatar_id":"","url":"https://api.github.com/users/FinnStutzenstein","html_url":"https://github.com/FinnStutzenstein","followers_url":"https://api.github.com/users/FinnStutzenstein/followers","following_url":"https://api.github.com/users/FinnStutzenstein/following{/other_user}","gists_url":"https://api.github.com/users/FinnStutzenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/FinnStutzenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FinnStutzenstein/subscriptions","organizations_url":"https://api.github.com/users/FinnStutzenstein/orgs","repos_url":"https://api.github.com/users/FinnStutzenstein/repos","events_url":"https://api.github.com/users/FinnStutzenstein/events{/privacy}","received_events_url":"https://api.github.com/users/FinnStutzenstein/received_events","type":"User","site_admin":false},"body":"A new approve to store the comments in the config: A list with objects is now saved rather than a JSON string. For this reason the complete JSON validation could is removed and not error prone anymore. Additional the new ui element makes it simple to create, modify and delete comments.","created_at":"2016-09-13T07:37:55Z","updated_at":"2016-09-21T10:58:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e21af99983f38fdf3e6b49a677d21d76d1ddd2b6","assignee":{"login":"normanjaeckel","id":2073844,"avatar_url":"https://avatars.githubusercontent.com/u/2073844?v=3","gravatar_id":"","url":"https://api.github.com/users/normanjaeckel","html_url":"https://github.com/normanjaeckel","followers_url":"https://api.github.com/users/normanjaeckel/followers","following_url":"https://api.github.com/users/normanjaeckel/following{/other_user}","gists_url":"https://api.github.com/users/normanjaeckel/gists{/gist_id}","starred_url":"https://api.github.com/users/normanjaeckel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanjaeckel/subscriptions","organizations_url":"https://api.github.com/users/normanjaeckel/orgs","repos_url":"https://api.github.com/users/normanjaeckel/repos","events_url":"https://api.github.com/users/normanjaeckel/events{/privacy}","received_events_url":"https://api.github.com/users/normanjaeckel/received_events","type":"User","site_admin":false},"assignees":[{"login":"normanjaeckel","id":2073844,"avatar_url":"https://avatars.githubusercontent.com/u/2073844?v=3","gravatar_id":"","url":"https://api.github.com/users/normanjaeckel","html_url":"https://github.com/normanjaeckel","followers_url":"https://api.github.com/users/normanjaeckel/followers","following_url":"https://api.github.com/users/normanjaeckel/following{/other_user}","gists_url":"https://api.github.com/users/normanjaeckel/gists{/gist_id}","starred_url":"https://api.github.com/users/normanjaeckel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanjaeckel/subscriptions","organizations_url":"https://api.github.com/users/normanjaeckel/orgs","repos_url":"https://api.github.com/users/normanjaeckel/repos","events_url":"https://api.github.com/users/normanjaeckel/events{/privacy}","received_events_url":"https://api.github.com/users/normanjaeckel/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/OpenSlides/OpenSlides/milestones/21","html_url":"https://github.com/OpenSlides/OpenSlides/milestones/2.1","labels_url":"https://api.github.com/repos/OpenSlides/OpenSlides/milestones/21/labels","id":1291312,"number":21,"title":"2.1","description":"","creator":{"login":"ostcar","id":977937,"avatar_url":"https://avatars.githubusercontent.com/u/977937?v=3","gravatar_id":"","url":"https://api.github.com/users/ostcar","html_url":"https://github.com/ostcar","followers_url":"https://api.github.com/users/ostcar/followers","following_url":"https://api.github.com/users/ostcar/following{/other_user}","gists_url":"https://api.github.com/users/ostcar/gists{/gist_id}","starred_url":"https://api.github.com/users/ostcar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ostcar/subscriptions","organizations_url":"https://api.github.com/users/ostcar/orgs","repos_url":"https://api.github.com/users/ostcar/repos","events_url":"https://api.github.com/users/ostcar/events{/privacy}","received_events_url":"https://api.github.com/users/ostcar/received_events","type":"User","site_admin":false},"open_issues":112,"closed_issues":206,"state":"open","created_at":"2015-09-04T21:00:55Z","updated_at":"2016-09-21T10:40:14Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380/commits","review_comments_url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380/comments","review_comment_url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/2380/comments","statuses_url":"https://api.github.com/repos/OpenSlides/OpenSlides/statuses/0f42bbc18497d08421d4f669c3fe0fbdb9ec5051","head":{"label":"FinnStutzenstein:Issue2348","ref":"Issue2348","sha":"0f42bbc18497d08421d4f669c3fe0fbdb9ec5051","user":{"login":"FinnStutzenstein","id":8439581,"avatar_url":"https://avatars.githubusercontent.com/u/8439581?v=3","gravatar_id":"","url":"https://api.github.com/users/FinnStutzenstein","html_url":"https://github.com/FinnStutzenstein","followers_url":"https://api.github.com/users/FinnStutzenstein/followers","following_url":"https://api.github.com/users/FinnStutzenstein/following{/other_user}","gists_url":"https://api.github.com/users/FinnStutzenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/FinnStutzenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FinnStutzenstein/subscriptions","organizations_url":"https://api.github.com/users/FinnStutzenstein/orgs","repos_url":"https://api.github.com/users/FinnStutzenstein/repos","events_url":"https://api.github.com/users/FinnStutzenstein/events{/privacy}","received_events_url":"https://api.github.com/users/FinnStutzenstein/received_events","type":"User","site_admin":false},"repo":{"id":64663189,"name":"OpenSlides","full_name":"FinnStutzenstein/OpenSlides","owner":{"login":"FinnStutzenstein","id":8439581,"avatar_url":"https://avatars.githubusercontent.com/u/8439581?v=3","gravatar_id":"","url":"https://api.github.com/users/FinnStutzenstein","html_url":"https://github.com/FinnStutzenstein","followers_url":"https://api.github.com/users/FinnStutzenstein/followers","following_url":"https://api.github.com/users/FinnStutzenstein/following{/other_user}","gists_url":"https://api.github.com/users/FinnStutzenstein/gists{/gist_id}","starred_url":"https://api.github.com/users/FinnStutzenstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FinnStutzenstein/subscriptions","organizations_url":"https://api.github.com/users/FinnStutzenstein/orgs","repos_url":"https://api.github.com/users/FinnStutzenstein/repos","events_url":"https://api.github.com/users/FinnStutzenstein/events{/privacy}","received_events_url":"https://api.github.com/users/FinnStutzenstein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FinnStutzenstein/OpenSlides","description":"Presentation and assembly system","fork":true,"url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides","forks_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/forks","keys_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/teams","hooks_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/hooks","issue_events_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/issues/events{/number}","events_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/events","assignees_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/assignees{/user}","branches_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/branches{/branch}","tags_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/tags","blobs_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/git/refs{/sha}","trees_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/statuses/{sha}","languages_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/languages","stargazers_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/stargazers","contributors_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/contributors","subscribers_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/subscribers","subscription_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/subscription","commits_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/commits{/sha}","git_commits_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/git/commits{/sha}","comments_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/comments{/number}","issue_comment_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/issues/comments{/number}","contents_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/contents/{+path}","compare_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/merges","archive_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/downloads","issues_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/issues{/number}","pulls_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/pulls{/number}","milestones_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/milestones{/number}","notifications_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/labels{/name}","releases_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/releases{/id}","deployments_url":"https://api.github.com/repos/FinnStutzenstein/OpenSlides/deployments","created_at":"2016-08-01T11:58:39Z","updated_at":"2016-08-01T11:58:41Z","pushed_at":"2016-09-21T10:48:42Z","git_url":"git://github.com/FinnStutzenstein/OpenSlides.git","ssh_url":"git@github.com:FinnStutzenstein/OpenSlides.git","clone_url":"https://github.com/FinnStutzenstein/OpenSlides.git","svn_url":"https://github.com/FinnStutzenstein/OpenSlides","homepage":"http://openslides.org","size":38258,"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":"master"}},"base":{"label":"OpenSlides:master","ref":"master","sha":"96b4fb9fd99da40c85ad70d0006c639ce9084ffc","user":{"login":"OpenSlides","id":2055730,"avatar_url":"https://avatars.githubusercontent.com/u/2055730?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSlides","html_url":"https://github.com/OpenSlides","followers_url":"https://api.github.com/users/OpenSlides/followers","following_url":"https://api.github.com/users/OpenSlides/following{/other_user}","gists_url":"https://api.github.com/users/OpenSlides/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSlides/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSlides/subscriptions","organizations_url":"https://api.github.com/users/OpenSlides/orgs","repos_url":"https://api.github.com/users/OpenSlides/repos","events_url":"https://api.github.com/users/OpenSlides/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSlides/received_events","type":"Organization","site_admin":false},"repo":{"id":5250779,"name":"OpenSlides","full_name":"OpenSlides/OpenSlides","owner":{"login":"OpenSlides","id":2055730,"avatar_url":"https://avatars.githubusercontent.com/u/2055730?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSlides","html_url":"https://github.com/OpenSlides","followers_url":"https://api.github.com/users/OpenSlides/followers","following_url":"https://api.github.com/users/OpenSlides/following{/other_user}","gists_url":"https://api.github.com/users/OpenSlides/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSlides/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSlides/subscriptions","organizations_url":"https://api.github.com/users/OpenSlides/orgs","repos_url":"https://api.github.com/users/OpenSlides/repos","events_url":"https://api.github.com/users/OpenSlides/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSlides/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSlides/OpenSlides","description":"Presentation and assembly system","fork":false,"url":"https://api.github.com/repos/OpenSlides/OpenSlides","forks_url":"https://api.github.com/repos/OpenSlides/OpenSlides/forks","keys_url":"https://api.github.com/repos/OpenSlides/OpenSlides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSlides/OpenSlides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSlides/OpenSlides/teams","hooks_url":"https://api.github.com/repos/OpenSlides/OpenSlides/hooks","issue_events_url":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSlides/OpenSlides/events","assignees_url":"https://api.github.com/repos/OpenSlides/OpenSlides/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSlides/OpenSlides/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSlides/OpenSlides/tags","blobs_url":"https://api.github.com/repos/OpenSlides/OpenSlides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSlides/OpenSlides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSlides/OpenSlides/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSlides/OpenSlides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSlides/OpenSlides/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSlides/OpenSlides/languages","stargazers_url":"https://api.github.com/repos/OpenSlides/OpenSlides/stargazers","contributors_url":"https://api.github.com/repos/OpenSlides/OpenSlides/contributors","subscribers_url":"https://api.github.com/repos/OpenSlides/OpenSlides/subscribers","subscription_url":"https://api.github.com/repos/OpenSlides/OpenSlides/subscription","commits_url":"https://api.github.com/repos/OpenSlides/OpenSlides/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSlides/OpenSlides/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSlides/OpenSlides/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSlides/OpenSlides/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSlides/OpenSlides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSlides/OpenSlides/merges","archive_url":"https://api.github.com/repos/OpenSlides/OpenSlides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSlides/OpenSlides/downloads","issues_url":"https://api.github.com/repos/OpenSlides/OpenSlides/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSlides/OpenSlides/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSlides/OpenSlides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSlides/OpenSlides/labels{/name}","releases_url":"https://api.github.com/repos/OpenSlides/OpenSlides/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSlides/OpenSlides/deployments","created_at":"2012-07-31T20:04:39Z","updated_at":"2016-09-12T12:26:08Z","pushed_at":"2016-09-21T10:48:42Z","git_url":"git://github.com/OpenSlides/OpenSlides.git","ssh_url":"git@github.com:OpenSlides/OpenSlides.git","clone_url":"https://github.com/OpenSlides/OpenSlides.git","svn_url":"https://github.com/OpenSlides/OpenSlides","homepage":"http://openslides.org","size":39428,"stargazers_count":122,"watchers_count":122,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":165,"forks":46,"open_issues":165,"watchers":122,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380"},"html":{"href":"https://github.com/OpenSlides/OpenSlides/pull/2380"},"issue":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/2380"},"comments":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/issues/2380/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/pulls/2380/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSlides/OpenSlides/statuses/0f42bbc18497d08421d4f669c3fe0fbdb9ec5051"}}}}
{"actor":{"display_login":"normanjaeckel"}}