{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/17759","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/17759/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/17759/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/17759/events","html_url":"https://github.com/magento/magento2/issues/17759","id":353271432,"node_id":"MDU6SXNzdWUzNTMyNzE0MzI=","number":17759,"title":"M2.2.5 : CustomerRepository::getList() does not load custom attribute if the name is \"company\"","user":{"login":"kanduvisla","id":346681,"node_id":"MDQ6VXNlcjM0NjY4MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/346681?v=4","gravatar_id":"","url":"https://api.github.com/users/kanduvisla","html_url":"https://github.com/kanduvisla","followers_url":"https://api.github.com/users/kanduvisla/followers","following_url":"https://api.github.com/users/kanduvisla/following{/other_user}","gists_url":"https://api.github.com/users/kanduvisla/gists{/gist_id}","starred_url":"https://api.github.com/users/kanduvisla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanduvisla/subscriptions","organizations_url":"https://api.github.com/users/kanduvisla/orgs","repos_url":"https://api.github.com/users/kanduvisla/repos","events_url":"https://api.github.com/users/kanduvisla/events{/privacy}","received_events_url":"https://api.github.com/users/kanduvisla/received_events","type":"User","site_admin":false},"labels":[{"id":374015207,"node_id":"MDU6TGFiZWwzNzQwMTUyMDc=","url":"https://api.github.com/repos/magento/magento2/labels/Component:%20Customer","name":"Component: Customer","color":"7fb703","default":false},{"id":1113650996,"node_id":"MDU6TGFiZWwxMTEzNjUwOTk2","url":"https://api.github.com/repos/magento/magento2/labels/Event:%20mageconf","name":"Event: mageconf","color":"ededed","default":false},{"id":1105723778,"node_id":"MDU6TGFiZWwxMTA1NzIzNzc4","url":"https://api.github.com/repos/magento/magento2/labels/Event:%20mm18mx","name":"Event: mm18mx","color":"ededed","default":false},{"id":686420665,"node_id":"MDU6TGFiZWw2ODY0MjA2NjU=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Clear%20Description","name":"Issue: Clear Description","color":"0e8a16","default":false},{"id":686476746,"node_id":"MDU6TGFiZWw2ODY0NzY3NDY=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Confirmed","name":"Issue: Confirmed","color":"0e8a16","default":false},{"id":688811200,"node_id":"MDU6TGFiZWw2ODg4MTEyMDA=","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Format%20is%20valid","name":"Issue: Format is valid","color":"0e8a16","default":false},{"id":21716835,"node_id":"MDU6TGFiZWwyMTcxNjgzNQ==","url":"https://api.github.com/repos/magento/magento2/labels/Issue:%20Ready%20for%20Work","name":"Issue: Ready for Work","color":"0e8a16","default":false},{"id":686477126,"node_id":"MDU6TGFiZWw2ODY0NzcxMjY=","url":"https://api.github.com/repos/magento/magento2/labels/Reproduced%20on%202.2.x","name":"Reproduced on 2.2.x","color":"e99695","default":false},{"id":686477167,"node_id":"MDU6TGFiZWw2ODY0NzcxNjc=","url":"https://api.github.com/repos/magento/magento2/labels/Reproduced%20on%202.3.x","name":"Reproduced on 2.3.x","color":"e99695","default":false},{"id":171957979,"node_id":"MDU6TGFiZWwxNzE5NTc5Nzk=","url":"https://api.github.com/repos/magento/magento2/labels/up%20for%20grabs","name":"up for grabs","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":{"login":"nik4152","id":1374095,"node_id":"MDQ6VXNlcjEzNzQwOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1374095?v=4","gravatar_id":"","url":"https://api.github.com/users/nik4152","html_url":"https://github.com/nik4152","followers_url":"https://api.github.com/users/nik4152/followers","following_url":"https://api.github.com/users/nik4152/following{/other_user}","gists_url":"https://api.github.com/users/nik4152/gists{/gist_id}","starred_url":"https://api.github.com/users/nik4152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nik4152/subscriptions","organizations_url":"https://api.github.com/users/nik4152/orgs","repos_url":"https://api.github.com/users/nik4152/repos","events_url":"https://api.github.com/users/nik4152/events{/privacy}","received_events_url":"https://api.github.com/users/nik4152/received_events","type":"User","site_admin":false},"assignees":[{"login":"nik4152","id":1374095,"node_id":"MDQ6VXNlcjEzNzQwOTU=","avatar_url":"https://avatars3.githubusercontent.com/u/1374095?v=4","gravatar_id":"","url":"https://api.github.com/users/nik4152","html_url":"https://github.com/nik4152","followers_url":"https://api.github.com/users/nik4152/followers","following_url":"https://api.github.com/users/nik4152/following{/other_user}","gists_url":"https://api.github.com/users/nik4152/gists{/gist_id}","starred_url":"https://api.github.com/users/nik4152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nik4152/subscriptions","organizations_url":"https://api.github.com/users/nik4152/orgs","repos_url":"https://api.github.com/users/nik4152/repos","events_url":"https://api.github.com/users/nik4152/events{/privacy}","received_events_url":"https://api.github.com/users/nik4152/received_events","type":"User","site_admin":false},{"login":"AlexandrKozyr","id":9674839,"node_id":"MDQ6VXNlcjk2NzQ4Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/9674839?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexandrKozyr","html_url":"https://github.com/AlexandrKozyr","followers_url":"https://api.github.com/users/AlexandrKozyr/followers","following_url":"https://api.github.com/users/AlexandrKozyr/following{/other_user}","gists_url":"https://api.github.com/users/AlexandrKozyr/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexandrKozyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexandrKozyr/subscriptions","organizations_url":"https://api.github.com/users/AlexandrKozyr/orgs","repos_url":"https://api.github.com/users/AlexandrKozyr/repos","events_url":"https://api.github.com/users/AlexandrKozyr/events{/privacy}","received_events_url":"https://api.github.com/users/AlexandrKozyr/received_events","type":"User","site_admin":false},{"login":"irving0mar","id":25356743,"node_id":"MDQ6VXNlcjI1MzU2NzQz","avatar_url":"https://avatars2.githubusercontent.com/u/25356743?v=4","gravatar_id":"","url":"https://api.github.com/users/irving0mar","html_url":"https://github.com/irving0mar","followers_url":"https://api.github.com/users/irving0mar/followers","following_url":"https://api.github.com/users/irving0mar/following{/other_user}","gists_url":"https://api.github.com/users/irving0mar/gists{/gist_id}","starred_url":"https://api.github.com/users/irving0mar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irving0mar/subscriptions","organizations_url":"https://api.github.com/users/irving0mar/orgs","repos_url":"https://api.github.com/users/irving0mar/repos","events_url":"https://api.github.com/users/irving0mar/events{/privacy}","received_events_url":"https://api.github.com/users/irving0mar/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-08-23T08:13:13Z","updated_at":"2018-11-02T13:14:02Z","closed_at":null,"author_association":"NONE","body":"I have custom EAV attributes named \"company\" for customers, but this is not loaded if I use the `CustomerRepository::getList()`-method. Other custom attributes seem to be loaded properly.\r\n\r\n### Preconditions\r\n\r\n1. Magento 2.2.5\r\n\r\n### Steps to reproduce\r\n\r\n1. Create customer EAV attribute named \"company\" (varchar)\r\n2. Populate it with some data\r\n3. Load it with `CustomerRepository::get() / getById()`\r\n4. Load it with `CustomerRepository::getList()`\r\n\r\n### Expected result\r\n\r\nIn both the situations, `$customer->getCustomAttribute('company')->getValue()` should return the value defined for this attribute.\r\n\r\n### Actual result\r\n\r\nThe `get()` / `getById()`-method loads the proper value, `getList()` returns `NULL`.\r\n\r\n### Possible cause\r\n\r\nMy best guess is that it has something to do with the fact that `getList()` joins the customer address that also has a `company`-column:\r\n\r\n    $collection->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')\r\n        ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')\r\n        ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')\r\n        ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')\r\n        ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left')\r\n        ->joinAttribute('company', 'customer_address/company', 'default_billing', null, 'left');\r\n\r\n### Possible solution\r\n\r\nI can think of 2 solutions:\r\n\r\n- Throw an exception that `company` (or whatever other joined attributed) is a reserved keyword.\r\n- Allow the customer model to override the address attributes (order of loading)\r\n\r\n### Workaround\r\n\r\nI currently have to do the following workaround (in my situation, my search criteria always returns 1 customer):\r\n\r\n    $customers = $customerSearchResult->getItems();\r\n    return $this->customerRepository->getById($customers[0]->getId());\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/435376136","html_url":"https://github.com/magento/magento2/issues/17759#issuecomment-435376136","issue_url":"https://api.github.com/repos/magento/magento2/issues/17759","id":435376136,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTM3NjEzNg==","user":{"login":"magento-engcom-team","id":31669971,"node_id":"MDQ6VXNlcjMxNjY5OTcx","avatar_url":"https://avatars1.githubusercontent.com/u/31669971?v=4","gravatar_id":"","url":"https://api.github.com/users/magento-engcom-team","html_url":"https://github.com/magento-engcom-team","followers_url":"https://api.github.com/users/magento-engcom-team/followers","following_url":"https://api.github.com/users/magento-engcom-team/following{/other_user}","gists_url":"https://api.github.com/users/magento-engcom-team/gists{/gist_id}","starred_url":"https://api.github.com/users/magento-engcom-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magento-engcom-team/subscriptions","organizations_url":"https://api.github.com/users/magento-engcom-team/orgs","repos_url":"https://api.github.com/users/magento-engcom-team/repos","events_url":"https://api.github.com/users/magento-engcom-team/events{/privacy}","received_events_url":"https://api.github.com/users/magento-engcom-team/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T13:14:02Z","updated_at":"2018-11-02T13:14:02Z","author_association":"CONTRIBUTOR","body":"Hi @nik4152. Thank you for working on this issue. \nLooks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:\n- [ ] 1. Add/Edit `Component: XXXXX` label(s) to the ticket, indicating the components it may be related to.\n\n- [ ] 2. Verify that the issue is reproducible on `2.3-develop` branch<details><summary>Details</summary>- Add the comment `@magento-engcom-team give me 2.3-develop instance` to deploy test instance on Magento infrastructure. <br/> - If the issue is reproducible on `2.3-develop` branch, please, add the label `Reproduced on 2.3.x`.<br/>- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and **_stop verification process here_**!\n</details>\n\n- [ ] 3. Verify that the issue is reproducible on `2.2-develop` branch. <details><summary>Details</summary>- Add the comment `@magento-engcom-team give me 2.2-develop instance` to deploy test instance on Magento infrastructure. <br/>- If the issue is reproducible on `2.2-develop` branch, please add the label `Reproduced on 2.2.x`</details>\n\n- [ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.\n"}}
{"actor":{"display_login":"magento-engcom-team"}}