magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Cannot create (string) 5 as Attribute Option Label if Attribute Option ID = 5 exists

Open bytes-commerce opened this issue 3 years ago • 9 comments

Preconditions (*)

  1. create attributes via AttributeOptionLabelInterfaceFactory and AttributeOptionInterfaceFactory and persist them via AttributeOptionManagementInterface
  2. create up to N attributes (amount doesn't matter much as it seems)

Steps to reproduce (*)

  1. Set up a clean instance of magento 2.4-develop.
  2. Chose an attribute (eg: climate). Created attribute options via AttributeOptionLabelInterfaceFactory and AttributeOptionInterfaceFactory and saved them via AttributeOptionManagementInterface. Screenshot 2021-09-01 at 08 24 01
Screenshot 2021-09-01 at 08 15 06
  1. Checked the option Id of the newly created options (say 220, 221..).
  2. Now try to repeat step 3 with labels as 220, 221 etc (since they are the option Ids of the chosen attribute). Encountered the following exception & the attribute option was not created. Screenshot 2021-09-01 at 08 16 42

Note: Adding an attribute option which is an existing option Id of the attribute works via the admin panel.

Expected result (*)

  1. The attribute gets correctly created as there exists no such option as (string) 5 yet

Actual result (*)

  1. there is an error that the Label already exists in Admin store when its not

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [ ] 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”.

bytes-commerce avatar Aug 28 '21 20:08 bytes-commerce

Hi @nopenopenope. Thank you for your report. To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] avatar Aug 28 '21 20:08 m2-assistant[bot]

Hi @engcom-Echo. 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: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components 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.

m2-assistant[bot] avatar Aug 30 '21 08:08 m2-assistant[bot]

@magento give me 2.4-develop instance

engcom-Echo avatar Aug 31 '21 05:08 engcom-Echo

Hi @engcom-Echo. Thank you for your request. I'm working on Magento instance for you.

Hi @engcom-Echo, here is your Magento Instance: https://fce25a19386c1ee59e659c30591b706e-2-4-develop.instances.magento-community.engineering Admin access: https://fce25a19386c1ee59e659c30591b706e-2-4-develop.instances.magento-community.engineering/admin_5d7f Login: 84352269 Password: 88e85ac1a1ef

Hi @nopenopenope Thanks for reporting this issue. I have verified this issue on 2.4-develop branch Here are the steps I followed.

  1. Set up a clean instance of magento 2.4-develop.
  2. Chose an attribute (eg: climate). Created attribute options via AttributeOptionLabelInterfaceFactory and AttributeOptionInterfaceFactory and saved them via AttributeOptionManagementInterface. Screenshot 2021-09-01 at 08 24 01
Screenshot 2021-09-01 at 08 15 06
  1. Checked the option Id of the newly created options (say 220, 221..).
  2. Now try to repeat step 3 with labels as 220, 221 etc (since they are the option Ids of the chosen attribute). Encountered the following exception & the attribute option was not created. Screenshot 2021-09-01 at 08 16 42

Note: Adding an attribute option which is an existing option Id of the attribute works via the admin panel.

engcom-Echo avatar Sep 01 '21 02:09 engcom-Echo

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1115 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Sep 01 '21 03:09 github-jira-sync-bot

:white_check_mark: Confirmed by @engcom-Echo. Thank you for verifying the issue.
Issue Available: @engcom-Echo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

m2-assistant[bot] avatar Sep 01 '21 03:09 m2-assistant[bot]

Still open. Ist dere any update for this?

bytes-commerce avatar Aug 11 '22 08:08 bytes-commerce