Skip to content

Company's Customer Group ID is not assigned to company admin's Customer Group Id when company admin is changed #39964

Open
@zhovnirigor

Description

@zhovnirigor

Preconditions and environment

  • Magento version 2.4.8
  • B2B module is installed
  • Two Shared Catalogs are created: Shared Catalog One, Shared Catalog Two
  • Two Companies are created: Company One, Company Two. Company One is assigned to Shared Catalog One, Company Two - to Shared Catalog Two (in other words, Shared Catalog One is selected as Customer Group for Company One etc).
  • Customer John Doe john.doe@example.com is created and assigned to Company One.
  • Customer John Doe is NOT an admin of Company One (just a company user).

Steps to reproduce

  1. All actions below are done in admin panel.
  2. Edit Company Two (Customers -> Companies -> find and edit Company Two).
  3. In Company Admin tab, Email field, enter john.doe@example.com
  4. Save Company Two.

Expected result

In customer_entity table, john.doe@example.com customer has group_id which equals to Shared Catalog Two.
As a result, tier prices, category permissions etc for John Doe are based on Shared Catalog Two customer group

Actual result

In customer_entity table, john.doe@example.com customer still has group_id which equals to Shared Catalog One. It didn't change after John Doe became an admin of Company Two.
As a result, tier prices, category permissions etc for John Doe are based on Shared Catalog One customer group. There is no clue about this situation for the admin use as in the admin panel Shared Catalog Two is displayed as a John Doe's customer group, which is not true.

Additional information

It happens due to the old company being default in company_advanced_customer_entity. However, it makes sense to have the Company Two as a default one since it is the company customer is an admin of.

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”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Adobe CommerceThe issue related to the Adobe Commerce(EE) or B2B functionalityArea: CatalogComponent: UserIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Reported on 2.4.8Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Ready for Development

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions