Skip to content

Customer group CUST_GROUP_ALL not selected in adminhtml after attribute save #10436

@mashb1t

Description

@mashb1t

Preconditions

  1. Magento 2.1.7 EE
  2. PHP 7.0.20

Steps to reproduce

  1. Call method \Magento\Customer\Model\Customer\Source\Group::toOptionArray

Expected result

  1. All $customerGroups['value'] should be of type string

Actual result

  1. First customer group value (\Magento\Customer\Api\Data\GroupInterface::CUST_GROUP_ALL) is integer

Solution

  1. Cast GroupInterface::CUST_GROUP_ALL to string

'value' => GroupInterface::CUST_GROUP_ALL,

When using the result of \Magento\Customer\Model\Customer\Source\Group::toOptionArray as options in an (multiselect) attribute source model, the respective customer group CUST_GROUP_ALL is not getting selected in the Magento Admin-Panel despite the value of the group being set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for development

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions