{"action":"created","comment":{"url":"https://api.github.com/repos/shopware/shopware/pulls/comments/220778503","pull_request_review_id":159265648,"id":220778503,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDc3ODUwMw==","diff_hunk":"@@ -517,6 +517,9 @@ public function prepareCreateOrderDetailsData(array $params)\n                 $detailModel->setShipped($detail['shipped']);\n             }\n \n+            // Set attributes\n+            (isset($detail['attribute'])) ? $detailModel->setAttribute($detail['attribute']) : $detailModel->setAttribute([null]);","path":"engine/Shopware/Components/Api/Resource/Order.php","position":5,"original_position":5,"commit_id":"29ea20aeec881e8a41dd5e39ca98548ecb0cb379","original_commit_id":"29ea20aeec881e8a41dd5e39ca98548ecb0cb379","user":{"login":"shyim","id":6224096,"node_id":"MDQ6VXNlcjYyMjQwOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/6224096?v=4","gravatar_id":"","url":"https://api.github.com/users/shyim","html_url":"https://github.com/shyim","followers_url":"https://api.github.com/users/shyim/followers","following_url":"https://api.github.com/users/shyim/following{/other_user}","gists_url":"https://api.github.com/users/shyim/gists{/gist_id}","starred_url":"https://api.github.com/users/shyim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shyim/subscriptions","organizations_url":"https://api.github.com/users/shyim/orgs","repos_url":"https://api.github.com/users/shyim/repos","events_url":"https://api.github.com/users/shyim/events{/privacy}","received_events_url":"https://api.github.com/users/shyim/received_events","type":"User","site_admin":false},"body":"When i am updating my order status, would this not kill the detail attributes, because they are not given?","created_at":"2018-09-27T02:36:45Z","updated_at":"2018-09-27T02:36:45Z","html_url":"https://github.com/shopware/shopware/pull/1811#discussion_r220778503","pull_request_url":"https://api.github.com/repos/shopware/shopware/pulls/1811","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/shopware/shopware/pulls/comments/220778503"},"html":{"href":"https://github.com/shopware/shopware/pull/1811#discussion_r220778503"},"pull_request":{"href":"https://api.github.com/repos/shopware/shopware/pulls/1811"}}},"pull_request":{"url":"https://api.github.com/repos/shopware/shopware/pulls/1811","id":218451903,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NDUxOTAz","html_url":"https://github.com/shopware/shopware/pull/1811","diff_url":"https://github.com/shopware/shopware/pull/1811.diff","patch_url":"https://github.com/shopware/shopware/pull/1811.patch","issue_url":"https://api.github.com/repos/shopware/shopware/issues/1811","number":1811,"state":"open","locked":false,"title":"Order api tests + attribute fix","user":{"login":"Isengo1989","id":8600299,"node_id":"MDQ6VXNlcjg2MDAyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/8600299?v=4","gravatar_id":"","url":"https://api.github.com/users/Isengo1989","html_url":"https://github.com/Isengo1989","followers_url":"https://api.github.com/users/Isengo1989/followers","following_url":"https://api.github.com/users/Isengo1989/following{/other_user}","gists_url":"https://api.github.com/users/Isengo1989/gists{/gist_id}","starred_url":"https://api.github.com/users/Isengo1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isengo1989/subscriptions","organizations_url":"https://api.github.com/users/Isengo1989/orgs","repos_url":"https://api.github.com/users/Isengo1989/repos","events_url":"https://api.github.com/users/Isengo1989/events{/privacy}","received_events_url":"https://api.github.com/users/Isengo1989/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for contributing to Shopware! Please fill out this description template to help us to process your pull request.\r\n\r\nPlease make sure to fulfil our contribution guideline (https://developers.shopware.com/contributing/contribution-guideline/).\r\n-->\r\n\r\n### 1. Why is this change necessary?\r\nWhen posting and updating orders it was not possible to set attributes from s_order_details_attributes. This PR will fix that and also create null attributes for the s_order_details_attributes if none given.\r\n\r\nAlso I created a Shopware_Tests_Api_OrderTest Class and added a few API tests for better codecoverage\r\n\r\n### 2. What does this change do, exactly?\r\nIt adds attribute to the whitelist and create the attribute on put and post of orders.\r\n\r\n### 3. Describe each step to reproduce the issue or behaviour.\r\nCreate an order -> No s_order_details_attributes is created\r\nUpdate an order -> No values will be inserted in s_order_details_attributes\r\n\r\n### 4. Please link to the relevant issues (if any).\r\nhttps://issues.shopware.com/issues/SW-22139\r\n\r\n### 5. Which documentation changes (if any) need to be made because of this PR?\r\n-\r\n\r\n### 6. Checklist\r\n\r\n- [x] I have written tests and verified that they fail without my change\r\n- [ ] I have squashed any insignificant commits\r\n- [ ] This change has comments for package types, values, functions, and non-obvious lines of code\r\n- [x] I have read the contribution requirements and fulfil them.\r\n","created_at":"2018-09-26T20:55:26Z","updated_at":"2018-09-27T02:36:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4955b9c287a504ecaac35943a3c79c23faff207e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shopware/shopware/pulls/1811/commits","review_comments_url":"https://api.github.com/repos/shopware/shopware/pulls/1811/comments","review_comment_url":"https://api.github.com/repos/shopware/shopware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shopware/shopware/issues/1811/comments","statuses_url":"https://api.github.com/repos/shopware/shopware/statuses/29ea20aeec881e8a41dd5e39ca98548ecb0cb379","head":{"label":"Isengo1989:OrderApiTests","ref":"OrderApiTests","sha":"29ea20aeec881e8a41dd5e39ca98548ecb0cb379","user":{"login":"Isengo1989","id":8600299,"node_id":"MDQ6VXNlcjg2MDAyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/8600299?v=4","gravatar_id":"","url":"https://api.github.com/users/Isengo1989","html_url":"https://github.com/Isengo1989","followers_url":"https://api.github.com/users/Isengo1989/followers","following_url":"https://api.github.com/users/Isengo1989/following{/other_user}","gists_url":"https://api.github.com/users/Isengo1989/gists{/gist_id}","starred_url":"https://api.github.com/users/Isengo1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isengo1989/subscriptions","organizations_url":"https://api.github.com/users/Isengo1989/orgs","repos_url":"https://api.github.com/users/Isengo1989/repos","events_url":"https://api.github.com/users/Isengo1989/events{/privacy}","received_events_url":"https://api.github.com/users/Isengo1989/received_events","type":"User","site_admin":false},"repo":{"id":127783934,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc3ODM5MzQ=","name":"shopware","full_name":"Isengo1989/shopware","private":false,"owner":{"login":"Isengo1989","id":8600299,"node_id":"MDQ6VXNlcjg2MDAyOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/8600299?v=4","gravatar_id":"","url":"https://api.github.com/users/Isengo1989","html_url":"https://github.com/Isengo1989","followers_url":"https://api.github.com/users/Isengo1989/followers","following_url":"https://api.github.com/users/Isengo1989/following{/other_user}","gists_url":"https://api.github.com/users/Isengo1989/gists{/gist_id}","starred_url":"https://api.github.com/users/Isengo1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Isengo1989/subscriptions","organizations_url":"https://api.github.com/users/Isengo1989/orgs","repos_url":"https://api.github.com/users/Isengo1989/repos","events_url":"https://api.github.com/users/Isengo1989/events{/privacy}","received_events_url":"https://api.github.com/users/Isengo1989/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Isengo1989/shopware","description":"Shopware Repository","fork":true,"url":"https://api.github.com/repos/Isengo1989/shopware","forks_url":"https://api.github.com/repos/Isengo1989/shopware/forks","keys_url":"https://api.github.com/repos/Isengo1989/shopware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Isengo1989/shopware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Isengo1989/shopware/teams","hooks_url":"https://api.github.com/repos/Isengo1989/shopware/hooks","issue_events_url":"https://api.github.com/repos/Isengo1989/shopware/issues/events{/number}","events_url":"https://api.github.com/repos/Isengo1989/shopware/events","assignees_url":"https://api.github.com/repos/Isengo1989/shopware/assignees{/user}","branches_url":"https://api.github.com/repos/Isengo1989/shopware/branches{/branch}","tags_url":"https://api.github.com/repos/Isengo1989/shopware/tags","blobs_url":"https://api.github.com/repos/Isengo1989/shopware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Isengo1989/shopware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Isengo1989/shopware/git/refs{/sha}","trees_url":"https://api.github.com/repos/Isengo1989/shopware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Isengo1989/shopware/statuses/{sha}","languages_url":"https://api.github.com/repos/Isengo1989/shopware/languages","stargazers_url":"https://api.github.com/repos/Isengo1989/shopware/stargazers","contributors_url":"https://api.github.com/repos/Isengo1989/shopware/contributors","subscribers_url":"https://api.github.com/repos/Isengo1989/shopware/subscribers","subscription_url":"https://api.github.com/repos/Isengo1989/shopware/subscription","commits_url":"https://api.github.com/repos/Isengo1989/shopware/commits{/sha}","git_commits_url":"https://api.github.com/repos/Isengo1989/shopware/git/commits{/sha}","comments_url":"https://api.github.com/repos/Isengo1989/shopware/comments{/number}","issue_comment_url":"https://api.github.com/repos/Isengo1989/shopware/issues/comments{/number}","contents_url":"https://api.github.com/repos/Isengo1989/shopware/contents/{+path}","compare_url":"https://api.github.com/repos/Isengo1989/shopware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Isengo1989/shopware/merges","archive_url":"https://api.github.com/repos/Isengo1989/shopware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Isengo1989/shopware/downloads","issues_url":"https://api.github.com/repos/Isengo1989/shopware/issues{/number}","pulls_url":"https://api.github.com/repos/Isengo1989/shopware/pulls{/number}","milestones_url":"https://api.github.com/repos/Isengo1989/shopware/milestones{/number}","notifications_url":"https://api.github.com/repos/Isengo1989/shopware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Isengo1989/shopware/labels{/name}","releases_url":"https://api.github.com/repos/Isengo1989/shopware/releases{/id}","deployments_url":"https://api.github.com/repos/Isengo1989/shopware/deployments","created_at":"2018-04-02T16:42:06Z","updated_at":"2018-09-20T15:18:47Z","pushed_at":"2018-09-26T20:51:38Z","git_url":"git://github.com/Isengo1989/shopware.git","ssh_url":"git@github.com:Isengo1989/shopware.git","clone_url":"https://github.com/Isengo1989/shopware.git","svn_url":"https://github.com/Isengo1989/shopware","homepage":"http://www.shopware.com","size":215035,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"5.4"}},"base":{"label":"shopware:5.5","ref":"5.5","sha":"eb8ccb6c92982b72a5a8fa0a1b50f45c1f46c45e","user":{"login":"shopware","id":612628,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxMjYyOA==","avatar_url":"https://avatars2.githubusercontent.com/u/612628?v=4","gravatar_id":"","url":"https://api.github.com/users/shopware","html_url":"https://github.com/shopware","followers_url":"https://api.github.com/users/shopware/followers","following_url":"https://api.github.com/users/shopware/following{/other_user}","gists_url":"https://api.github.com/users/shopware/gists{/gist_id}","starred_url":"https://api.github.com/users/shopware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopware/subscriptions","organizations_url":"https://api.github.com/users/shopware/orgs","repos_url":"https://api.github.com/users/shopware/repos","events_url":"https://api.github.com/users/shopware/events{/privacy}","received_events_url":"https://api.github.com/users/shopware/received_events","type":"Organization","site_admin":false},"repo":{"id":5682970,"node_id":"MDEwOlJlcG9zaXRvcnk1NjgyOTcw","name":"shopware","full_name":"shopware/shopware","private":false,"owner":{"login":"shopware","id":612628,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxMjYyOA==","avatar_url":"https://avatars2.githubusercontent.com/u/612628?v=4","gravatar_id":"","url":"https://api.github.com/users/shopware","html_url":"https://github.com/shopware","followers_url":"https://api.github.com/users/shopware/followers","following_url":"https://api.github.com/users/shopware/following{/other_user}","gists_url":"https://api.github.com/users/shopware/gists{/gist_id}","starred_url":"https://api.github.com/users/shopware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shopware/subscriptions","organizations_url":"https://api.github.com/users/shopware/orgs","repos_url":"https://api.github.com/users/shopware/repos","events_url":"https://api.github.com/users/shopware/events{/privacy}","received_events_url":"https://api.github.com/users/shopware/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/shopware/shopware","description":"Shopware Repository","fork":false,"url":"https://api.github.com/repos/shopware/shopware","forks_url":"https://api.github.com/repos/shopware/shopware/forks","keys_url":"https://api.github.com/repos/shopware/shopware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shopware/shopware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shopware/shopware/teams","hooks_url":"https://api.github.com/repos/shopware/shopware/hooks","issue_events_url":"https://api.github.com/repos/shopware/shopware/issues/events{/number}","events_url":"https://api.github.com/repos/shopware/shopware/events","assignees_url":"https://api.github.com/repos/shopware/shopware/assignees{/user}","branches_url":"https://api.github.com/repos/shopware/shopware/branches{/branch}","tags_url":"https://api.github.com/repos/shopware/shopware/tags","blobs_url":"https://api.github.com/repos/shopware/shopware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shopware/shopware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shopware/shopware/git/refs{/sha}","trees_url":"https://api.github.com/repos/shopware/shopware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shopware/shopware/statuses/{sha}","languages_url":"https://api.github.com/repos/shopware/shopware/languages","stargazers_url":"https://api.github.com/repos/shopware/shopware/stargazers","contributors_url":"https://api.github.com/repos/shopware/shopware/contributors","subscribers_url":"https://api.github.com/repos/shopware/shopware/subscribers","subscription_url":"https://api.github.com/repos/shopware/shopware/subscription","commits_url":"https://api.github.com/repos/shopware/shopware/commits{/sha}","git_commits_url":"https://api.github.com/repos/shopware/shopware/git/commits{/sha}","comments_url":"https://api.github.com/repos/shopware/shopware/comments{/number}","issue_comment_url":"https://api.github.com/repos/shopware/shopware/issues/comments{/number}","contents_url":"https://api.github.com/repos/shopware/shopware/contents/{+path}","compare_url":"https://api.github.com/repos/shopware/shopware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shopware/shopware/merges","archive_url":"https://api.github.com/repos/shopware/shopware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shopware/shopware/downloads","issues_url":"https://api.github.com/repos/shopware/shopware/issues{/number}","pulls_url":"https://api.github.com/repos/shopware/shopware/pulls{/number}","milestones_url":"https://api.github.com/repos/shopware/shopware/milestones{/number}","notifications_url":"https://api.github.com/repos/shopware/shopware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shopware/shopware/labels{/name}","releases_url":"https://api.github.com/repos/shopware/shopware/releases{/id}","deployments_url":"https://api.github.com/repos/shopware/shopware/deployments","created_at":"2012-09-05T05:32:50Z","updated_at":"2018-09-22T07:31:48Z","pushed_at":"2018-09-26T21:14:03Z","git_url":"git://github.com/shopware/shopware.git","ssh_url":"git@github.com:shopware/shopware.git","clone_url":"https://github.com/shopware/shopware.git","svn_url":"https://github.com/shopware/shopware","homepage":"http://www.shopware.com","size":215957,"stargazers_count":915,"watchers_count":915,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":642,"mirror_url":null,"archived":false,"open_issues_count":203,"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":642,"open_issues":203,"watchers":915,"default_branch":"5.5"}},"_links":{"self":{"href":"https://api.github.com/repos/shopware/shopware/pulls/1811"},"html":{"href":"https://github.com/shopware/shopware/pull/1811"},"issue":{"href":"https://api.github.com/repos/shopware/shopware/issues/1811"},"comments":{"href":"https://api.github.com/repos/shopware/shopware/issues/1811/comments"},"review_comments":{"href":"https://api.github.com/repos/shopware/shopware/pulls/1811/comments"},"review_comment":{"href":"https://api.github.com/repos/shopware/shopware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shopware/shopware/pulls/1811/commits"},"statuses":{"href":"https://api.github.com/repos/shopware/shopware/statuses/29ea20aeec881e8a41dd5e39ca98548ecb0cb379"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"shyim"}}