Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching customer entity through API will not return 'is_subscribed' extension attribute #13252

Closed
koenner01 opened this issue Jan 18, 2018 · 6 comments
Assignees
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@koenner01
Copy link
Contributor

In the Magento_Newsletter module an extension attribute 'is_subscribed' is defined for the \Magento\Customer\Api\Data\CustomerInterface. However when fetching the customer through api, the extension attribute is not present in the data.

Preconditions

  1. PHP7
  2. CE 2.2.2 (also tested EE 2.2.2)

Steps to reproduce

  1. Create a new customer through the frontend registration and make sure to check the subscribe to newsletter checkbox
  2. Fetch the newly created customer through the api call '../rest/nl/V1/customers/{newCustomerId}'

Expected result

  1. Extension attributes are present in the data containing a value for 'is_subscribed'

Actual result

  1. The extension attributes are missing from the customer data

I did some basic digging into the core and noticed there is no actual place in the Magento_Newsletter module that sets the extension attribute 'is_subscribed' after the customer is fetched.

I compared this with the Magento_GiftMessage module where in the Magento\GiftMessage\Model\Plugin folder there are several classes which contain logic to add extension attributes to the orders when fetching and saving.

Seems like somebody dropped the ball when programming the Magento_Newsletter module.
#magentomagic

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 18, 2018
@magento-engcom-team
Copy link
Contributor

@koenner01, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Jan 19, 2018
@koenner01
Copy link
Contributor Author

We have received a patch for this through the cloud support (but they asked us not to make it public as it is probably not final). This commit f9dd1b1#diff-8b13fe3225a8e5f17fa52fa6c5b74eda contains a fix (but it's not the same as we received through cloud)

@AGPDev
Copy link

AGPDev commented Jan 23, 2019

nice, one year and nothing

@yaroslav-zenin
Copy link
Contributor

why it is still not merged?

@rimsey1
Copy link

rimsey1 commented May 15, 2019

bump, agree what is stopping this feature being merged?

@magento-engcom-team
Copy link
Contributor

Hi @koenner01. Thank you for your report.
The issue has been fixed in #25311 by @enriquei4 in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants