{"action":"created","comment":{"url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/comments/175441776","pull_request_review_id":104969501,"id":175441776,"diff_hunk":"@@ -42,10 +42,18 @@ export function setCustomDataForEditor(editorState, key, value) {\n }\n \n function getDataFromArrayState(editorStateArr, key) {\n-    const editorState = editorStateArr[0];\n-    const firstBlock = editorState.blocks[0];\n+    let data = [];\n \n-    return firstBlock.data[key];\n+    // for each editor state we collect all data as one single array\n+    editorStateArr.forEach((editorState) => {\n+        const firstBlock = editorState.blocks[0];\n+\n+        if (firstBlock.data[key]) {\n+            data = [...data, ...firstBlock.data[key]];","path":"scripts/core/editor3/helpers/editor3CustomData.js","position":14,"original_position":14,"commit_id":"4c13b48b43ccfcd827f2b571e636aa36beda4d20","original_commit_id":"4c13b48b43ccfcd827f2b571e636aa36beda4d20","user":{"login":"tomaskikutis","id":2076953,"avatar_url":"https://avatars0.githubusercontent.com/u/2076953?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaskikutis","html_url":"https://github.com/tomaskikutis","followers_url":"https://api.github.com/users/tomaskikutis/followers","following_url":"https://api.github.com/users/tomaskikutis/following{/other_user}","gists_url":"https://api.github.com/users/tomaskikutis/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaskikutis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaskikutis/subscriptions","organizations_url":"https://api.github.com/users/tomaskikutis/orgs","repos_url":"https://api.github.com/users/tomaskikutis/repos","events_url":"https://api.github.com/users/tomaskikutis/events{/privacy}","received_events_url":"https://api.github.com/users/tomaskikutis/received_events","type":"User","site_admin":false},"body":"Why does the structure Petr posted doesn't work?\r\n\r\nIf I understand correctly, eve merges only the first dictionary, so in your snippet \"headline\" and \"slugline\" would get merged and we wouldn't be able to remove fields.\r\n\r\neditorState would no longer be required to be wrapped inside the array if we wrapped the root object as in Petr's snippet","created_at":"2018-03-19T13:55:12Z","updated_at":"2018-03-19T13:55:12Z","html_url":"https://github.com/superdesk/superdesk-client-core/pull/2151#discussion_r175441776","pull_request_url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/comments/175441776"},"html":{"href":"https://github.com/superdesk/superdesk-client-core/pull/2151#discussion_r175441776"},"pull_request":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151"}},"in_reply_to_id":175018270},"pull_request":{"url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151","id":174944348,"html_url":"https://github.com/superdesk/superdesk-client-core/pull/2151","diff_url":"https://github.com/superdesk/superdesk-client-core/pull/2151.diff","patch_url":"https://github.com/superdesk/superdesk-client-core/pull/2151.patch","issue_url":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/2151","number":2151,"state":"open","locked":false,"title":"Support tracking changes of multiple editors","user":{"login":"pablopunk","id":4324982,"avatar_url":"https://avatars0.githubusercontent.com/u/4324982?v=4","gravatar_id":"","url":"https://api.github.com/users/pablopunk","html_url":"https://github.com/pablopunk","followers_url":"https://api.github.com/users/pablopunk/followers","following_url":"https://api.github.com/users/pablopunk/following{/other_user}","gists_url":"https://api.github.com/users/pablopunk/gists{/gist_id}","starred_url":"https://api.github.com/users/pablopunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablopunk/subscriptions","organizations_url":"https://api.github.com/users/pablopunk/orgs","repos_url":"https://api.github.com/users/pablopunk/repos","events_url":"https://api.github.com/users/pablopunk/events{/privacy}","received_events_url":"https://api.github.com/users/pablopunk/received_events","type":"User","site_admin":false},"body":"If in the future we have comments/suggestions in other fields like Title, etc, we can show the history for this fields also.","created_at":"2018-03-14T12:48:49Z","updated_at":"2018-03-19T13:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f76c2bc0e9240b75aa95af2845a24164d6884aa1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/superdesk/superdesk-client-core/milestones/27","html_url":"https://github.com/superdesk/superdesk-client-core/milestone/27","labels_url":"https://api.github.com/repos/superdesk/superdesk-client-core/milestones/27/labels","id":3155804,"number":27,"title":"1.15","description":"","creator":{"login":"petrjasek","id":179249,"avatar_url":"https://avatars1.githubusercontent.com/u/179249?v=4","gravatar_id":"","url":"https://api.github.com/users/petrjasek","html_url":"https://github.com/petrjasek","followers_url":"https://api.github.com/users/petrjasek/followers","following_url":"https://api.github.com/users/petrjasek/following{/other_user}","gists_url":"https://api.github.com/users/petrjasek/gists{/gist_id}","starred_url":"https://api.github.com/users/petrjasek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrjasek/subscriptions","organizations_url":"https://api.github.com/users/petrjasek/orgs","repos_url":"https://api.github.com/users/petrjasek/repos","events_url":"https://api.github.com/users/petrjasek/events{/privacy}","received_events_url":"https://api.github.com/users/petrjasek/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":37,"state":"open","created_at":"2018-03-02T10:28:29Z","updated_at":"2018-03-16T17:03:26Z","due_on":"2018-03-16T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151/commits","review_comments_url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151/comments","review_comment_url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/2151/comments","statuses_url":"https://api.github.com/repos/superdesk/superdesk-client-core/statuses/4c13b48b43ccfcd827f2b571e636aa36beda4d20","head":{"label":"pablopunk:track-changes-multiple-fields","ref":"track-changes-multiple-fields","sha":"4c13b48b43ccfcd827f2b571e636aa36beda4d20","user":{"login":"pablopunk","id":4324982,"avatar_url":"https://avatars0.githubusercontent.com/u/4324982?v=4","gravatar_id":"","url":"https://api.github.com/users/pablopunk","html_url":"https://github.com/pablopunk","followers_url":"https://api.github.com/users/pablopunk/followers","following_url":"https://api.github.com/users/pablopunk/following{/other_user}","gists_url":"https://api.github.com/users/pablopunk/gists{/gist_id}","starred_url":"https://api.github.com/users/pablopunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablopunk/subscriptions","organizations_url":"https://api.github.com/users/pablopunk/orgs","repos_url":"https://api.github.com/users/pablopunk/repos","events_url":"https://api.github.com/users/pablopunk/events{/privacy}","received_events_url":"https://api.github.com/users/pablopunk/received_events","type":"User","site_admin":false},"repo":{"id":116799051,"name":"superdesk-client-core","full_name":"pablopunk/superdesk-client-core","owner":{"login":"pablopunk","id":4324982,"avatar_url":"https://avatars0.githubusercontent.com/u/4324982?v=4","gravatar_id":"","url":"https://api.github.com/users/pablopunk","html_url":"https://github.com/pablopunk","followers_url":"https://api.github.com/users/pablopunk/followers","following_url":"https://api.github.com/users/pablopunk/following{/other_user}","gists_url":"https://api.github.com/users/pablopunk/gists{/gist_id}","starred_url":"https://api.github.com/users/pablopunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablopunk/subscriptions","organizations_url":"https://api.github.com/users/pablopunk/orgs","repos_url":"https://api.github.com/users/pablopunk/repos","events_url":"https://api.github.com/users/pablopunk/events{/privacy}","received_events_url":"https://api.github.com/users/pablopunk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pablopunk/superdesk-client-core","description":"Common client modules for superdesk apps.","fork":true,"url":"https://api.github.com/repos/pablopunk/superdesk-client-core","forks_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/forks","keys_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/teams","hooks_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/hooks","issue_events_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/issues/events{/number}","events_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/events","assignees_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/assignees{/user}","branches_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/branches{/branch}","tags_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/tags","blobs_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/statuses/{sha}","languages_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/languages","stargazers_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/stargazers","contributors_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/contributors","subscribers_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/subscribers","subscription_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/subscription","commits_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/contents/{+path}","compare_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/merges","archive_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/downloads","issues_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/issues{/number}","pulls_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/pulls{/number}","milestones_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/milestones{/number}","notifications_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/labels{/name}","releases_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/releases{/id}","deployments_url":"https://api.github.com/repos/pablopunk/superdesk-client-core/deployments","created_at":"2018-01-09T10:04:09Z","updated_at":"2018-03-14T12:44:34Z","pushed_at":"2018-03-15T09:23:18Z","git_url":"git://github.com/pablopunk/superdesk-client-core.git","ssh_url":"git@github.com:pablopunk/superdesk-client-core.git","clone_url":"https://github.com/pablopunk/superdesk-client-core.git","svn_url":"https://github.com/pablopunk/superdesk-client-core","homepage":"","size":13527,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"superdesk:master","ref":"master","sha":"32bc4c62d56528644ba40a5e09723b85badbf909","user":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars2.githubusercontent.com/u/5527298?v=4","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"repo":{"id":50631400,"name":"superdesk-client-core","full_name":"superdesk/superdesk-client-core","owner":{"login":"superdesk","id":5527298,"avatar_url":"https://avatars2.githubusercontent.com/u/5527298?v=4","gravatar_id":"","url":"https://api.github.com/users/superdesk","html_url":"https://github.com/superdesk","followers_url":"https://api.github.com/users/superdesk/followers","following_url":"https://api.github.com/users/superdesk/following{/other_user}","gists_url":"https://api.github.com/users/superdesk/gists{/gist_id}","starred_url":"https://api.github.com/users/superdesk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superdesk/subscriptions","organizations_url":"https://api.github.com/users/superdesk/orgs","repos_url":"https://api.github.com/users/superdesk/repos","events_url":"https://api.github.com/users/superdesk/events{/privacy}","received_events_url":"https://api.github.com/users/superdesk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/superdesk/superdesk-client-core","description":"Common client modules for superdesk apps.","fork":false,"url":"https://api.github.com/repos/superdesk/superdesk-client-core","forks_url":"https://api.github.com/repos/superdesk/superdesk-client-core/forks","keys_url":"https://api.github.com/repos/superdesk/superdesk-client-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superdesk/superdesk-client-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superdesk/superdesk-client-core/teams","hooks_url":"https://api.github.com/repos/superdesk/superdesk-client-core/hooks","issue_events_url":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/events{/number}","events_url":"https://api.github.com/repos/superdesk/superdesk-client-core/events","assignees_url":"https://api.github.com/repos/superdesk/superdesk-client-core/assignees{/user}","branches_url":"https://api.github.com/repos/superdesk/superdesk-client-core/branches{/branch}","tags_url":"https://api.github.com/repos/superdesk/superdesk-client-core/tags","blobs_url":"https://api.github.com/repos/superdesk/superdesk-client-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superdesk/superdesk-client-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superdesk/superdesk-client-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/superdesk/superdesk-client-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superdesk/superdesk-client-core/statuses/{sha}","languages_url":"https://api.github.com/repos/superdesk/superdesk-client-core/languages","stargazers_url":"https://api.github.com/repos/superdesk/superdesk-client-core/stargazers","contributors_url":"https://api.github.com/repos/superdesk/superdesk-client-core/contributors","subscribers_url":"https://api.github.com/repos/superdesk/superdesk-client-core/subscribers","subscription_url":"https://api.github.com/repos/superdesk/superdesk-client-core/subscription","commits_url":"https://api.github.com/repos/superdesk/superdesk-client-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/superdesk/superdesk-client-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/superdesk/superdesk-client-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/superdesk/superdesk-client-core/contents/{+path}","compare_url":"https://api.github.com/repos/superdesk/superdesk-client-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superdesk/superdesk-client-core/merges","archive_url":"https://api.github.com/repos/superdesk/superdesk-client-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superdesk/superdesk-client-core/downloads","issues_url":"https://api.github.com/repos/superdesk/superdesk-client-core/issues{/number}","pulls_url":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls{/number}","milestones_url":"https://api.github.com/repos/superdesk/superdesk-client-core/milestones{/number}","notifications_url":"https://api.github.com/repos/superdesk/superdesk-client-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superdesk/superdesk-client-core/labels{/name}","releases_url":"https://api.github.com/repos/superdesk/superdesk-client-core/releases{/id}","deployments_url":"https://api.github.com/repos/superdesk/superdesk-client-core/deployments","created_at":"2016-01-29T02:33:16Z","updated_at":"2018-03-16T16:09:48Z","pushed_at":"2018-03-16T17:03:27Z","git_url":"git://github.com/superdesk/superdesk-client-core.git","ssh_url":"git@github.com:superdesk/superdesk-client-core.git","clone_url":"https://github.com/superdesk/superdesk-client-core.git","svn_url":"https://github.com/superdesk/superdesk-client-core","homepage":"","size":13171,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":6,"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"},"forks":50,"open_issues":6,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151"},"html":{"href":"https://github.com/superdesk/superdesk-client-core/pull/2151"},"issue":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/2151"},"comments":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/issues/2151/comments"},"review_comments":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151/comments"},"review_comment":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/pulls/2151/commits"},"statuses":{"href":"https://api.github.com/repos/superdesk/superdesk-client-core/statuses/4c13b48b43ccfcd827f2b571e636aa36beda4d20"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tomaskikutis"}}