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

can not update custom customer attribute value on customer edit page in admin #38730

Closed
1 of 5 tasks
GrassH opened this issue May 16, 2024 · 6 comments
Closed
1 of 5 tasks
Assignees
Labels
Adobe Commerce The issue related to the Adobe Commerce(EE) or B2B functionality Issue: needs update Additional information is require, waiting for response Reported on 2.4.7 Indicates original Magento version for the Issue report.

Comments

@GrassH
Copy link

GrassH commented May 16, 2024

Preconditions and environment

  • Magento CE 2.4.7

Please see the following code:

$this->storeManager->setCurrentStore($storeId);

$websiteId = $this->_storeManager->getStore()?->getWebsiteId();

$websiteId = $this->getWebsiteId();

Steps to reproduce

Create two websites: US and CA, US is default website, customer created by CA.

  1. Create a custom customer attribute (Test Attribute) in patch:
$this->customerSetup->addAttribute(
          Customer::ENTITY,
          'test_attribute',
          [
              'type' => 'varchar',
              'label' => __('Test Attribute'),
              'input' => 'text',
              'is_visible' => false,
              'required' => false,
              'user_defined' => true,
              'sort_order' => 999,
              'position' => 999,
              'visible_on_front' => false,
              'unique' => true,
              'system' => false,
              'global' => ScopedAttributeInterface::SCOPE_WEBSITE
          ]
  );

  $customerEntity = $this->customerSetup->getEavConfig()->getEntityType(Customer::ENTITY);
  $attributeSetId = $customerEntity->getDefaultAttributeSetId();
  $attribute = $this->customerSetup->getEavConfig()
      ->getAttribute(Customer::ENTITY, 'test_attribute')
      ->addData([
          'attribute_set_id' => $attributeSetId,
          'attribute_group_id' => $this->attributeSet->getDefaultGroupId($attributeSetId),
          'used_in_forms' => ['adminhtml_customer', 'customer_account_edit']
      ]);

$attribute->save();
  1. Go to customer edit page in admin
  2. Type some value to Test Attribute, e.g: test 1
  3. Click Save and Continue Edit, the value will be saved as test 1
  4. Type a new value to Test Attribute, e.g: test 2
  5. Click Save and Continue Edit, the value was expected to be "test 2", but the value is still "test 1"

image

Expected result

  1. Test Attribute value is updated to test 2

Actual result

  1. Test Attribute value is still test 1

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented May 16, 2024

Hi @GrassH. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-community-project m2-community-project bot added this to Ready for Confirmation in Issue Confirmation and Triage Board May 16, 2024
@GrassH GrassH changed the title can not update Custom Customer Attribute value on Customer Edit Page in Admin can not update custom customer attribute value on customer edit page in admin May 16, 2024
@engcom-Bravo engcom-Bravo added Reported on 2.4.7 Indicates original Magento version for the Issue report. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it labels May 16, 2024
@GrassH
Copy link
Author

GrassH commented May 17, 2024

Hi @engcom-Bravo,

This should not be labeled as a Dev.Experience. In fact the issue also exists in the commerce, the issue still occurs for admin user adding custom attribute from admin panel. This should be a bug.

@engcom-Bravo engcom-Bravo self-assigned this May 17, 2024
Copy link

m2-assistant bot commented May 17, 2024

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Bravo engcom-Bravo added Adobe Commerce The issue related to the Adobe Commerce(EE) or B2B functionality and removed Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it labels May 17, 2024
@engcom-Bravo
Copy link
Contributor

Hi @GrassH,

Thanks for your reporting and collaboration.

We have verified the issue in 2.4-develop instance and the issue is not reproducible.Kindly refer the attached video.

Screen.Recording.2024-05-17.at.12.51.06.mov

Test Attribute value is updated to test 2.

Could you please let us know if we are missing anything.

Thanks.

@engcom-Bravo engcom-Bravo added the Issue: needs update Additional information is require, waiting for response label May 17, 2024
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board May 17, 2024
@GrassH
Copy link
Author

GrassH commented May 20, 2024

Hi @engcom-Bravo,

Thank you for your test. I tested on 2.4.7, and this issue has been fixed in 2.4-develop. The same issue is reported in #ACP2E-2791, I'm not sure if it is an internal ticket, I didn't find this ticket in the community. Please see 6db1257

@engcom-Bravo
Copy link
Contributor

Hi @GrassH,

Thanks for your update.

As I can see this issue got fixed in the scope of the internal Jira ticket ACP2E-2791 by the internal team
Related commits:https://github.com/search?q=repo%3Amagento%2Fmagento2+ACP2E-2791&type=commits

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Adobe Commerce The issue related to the Adobe Commerce(EE) or B2B functionality Issue: needs update Additional information is require, waiting for response Reported on 2.4.7 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests

2 participants