Skip to content

Custom Product Attribute changes 'backend_type' when 'is_user_defined = 1' and get updated/saved in Admin Backend #9219

Closed
@mhauri

Description

@mhauri

Preconditions

  1. Magento: 2.1.4 to 2.1.6, maybe earlier versions are affected too.

Steps to reproduce

  1. Create a custom Product attribute via Setup of a Custom Module:
[
    'required' => 0,
    'global' => ScopedAttributeInterface::SCOPE_GLOBAL,
    'group' => 'Test',
    'searchable' => 0,
    'comparable' => 0,
    'used_for_sort_by' => 0,
    'used_in_product_listing' => 0,
    'visible_in_advanced_search' => 0,
    'user_defined' => 1,
    'is_html_allowed_on_front' => 1,
    'visible_on_front' => 1,
    'input' => 'select',
    'source' => 'Test\Test\Model\Attribute\Source\Discount',
    'backend_type' => 'varchar',
    'label' => 'Discount',
    'position' => 1,
]
  1. Go to the Backend Stores > Attributes > Product
  2. Click on the newly created attribute and save it (with or without modifications).

Expected result

  1. The backend_type doesn't change for the custom attribute.

Actual result

  1. The backend_type got changed from varchar to int

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions