magento/magento2

Making new child in existing configurable overwrites sources for all existing children

IanFiretoys opened this issue · 45 comments

Preconditions and environment

  • Magento version
  • Anything else that would help a developer reproduce the bug
    magento 2.4.5-p1
    have tested this on custom stock and default stock, was able to replicate on both

Steps to reproduce

  1. open existing configurable product in admin
  2. navigate to Configurations > current variations
  3. Edit configurations
  4. leave the attributes as they are and hit next
  5. select an additional attribute value to increase the range and hit next
  6. choose any option for "Quantity per source" (for this example, Apply single quantity to each SKU)
  7. assign source and set qty of 1
  8. next

Expected result

  • preview shows list of associated products, with the existing products intact below
  • new product shows quantity per source listed as 1
  • existing products show their current quantity per source as they were before this process

then you can hit generate products and save the configurable to continue

Actual result

  • preview shows list of associated products, with the existing products below
  • new product shows quantity per source listed as 1
  • existing products also show quantity per source listed as 1 - overwritten by the process of making a new child

if at this point you hit generate products and save out the config, these will be overwritten.

if "skip quantity at this time" remains selected, the source is removed from the other children entirely.

Additional information

as a workaround, you can untick all attribute values before selecting the new one at step 5, but then you need to manually add the existing child products back in once this process has completed.

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

Hi @IanFiretoys. 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.

@magento give me 2.4-develop instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

I have replicated on this develop instance, can confirm that stock is overwritten on default, but without MSI enabled, the source is not removed on "skip quantity at this time"

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.

@magento give me 2.4-develop instance

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

Hi @IanFiretoys,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.But,It is an Expected Behaviour of Magento.

Steps to reproduce

  • open existing configurable product in admin
  • navigate to Configurations > current variations
  • Edit configurations
  • leave the attributes as they are and hit next
  • select an additional attribute value to increase the range and hit next
  • choose any option for "Quantity per source" (for this example, Apply single quantity to each SKU)
  • assign source and set qty of 1
  • next

We are editing the entire Configurable Product for existing variations also, after increasing the attribute values range and we are giving quantity as Quantity per source it will take for existing variations also and it will again create new child products with new quantity because we have selected previous attributes values also.It is working as expected.

Kindly let us know if you are still facing any issue.

Thanks.

@engcom-Bravo do you mean that overwriting the stock for all children in an existing configurable product is the desired outcome to adding any new attributes?

what would be the correct route for adding a new child to a configurable product without disturbing the existing stocks?

this is also inconsistent with how the weight and price are treated, which are far more likely to be the same as each other (and static) than the quantity. why is the one dynamic function the part that gets overwritten?

@magento give me 2.4-develop instance

Hi @maghamed. Thank you for your request. I'm working on Magento instance for you.

@magento give me 2.4-develop instance

Hi @maghamed. Thank you for your request. I'm working on Magento instance for you.

@magento give me 2.4-develop instance

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

Hi @IanFiretoys,

Thanks for your update.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Teton-Pullover-Hoodie-Products-Inventory-Catalog-Magento-Admin

While editing the configurations we are editing previous configurations also so in that case it will overwrites existing children also.if we want to create new child products we need to untick the existing variations.It is woking as expected and it is expected behaviour of Magento.

Thanks.

thanks @engcom-Bravo
when unticking the existing variations as you describe, they are removed from the parent and must be manually added back in. is that also expected behaviour of magento or should i open a new issue for that?

Hi @IanFiretoys,

Thanks for your update.

We are considering this as feature request as this is existing behaviour of Magento.however this is a good feature to have.

Thanks.

@magento give me 2.4.3-release instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

Hi @IanFiretoys, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@magento give me 2.4.3-p2 instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

Hi @IanFiretoys, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@magento give me 2.4.3-p2 instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

Hi @IanFiretoys, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@magento give me 2.4.3-p2 instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

Hi @IanFiretoys, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

We're seeing the same issue. Has anyone found a solution to this?

@magento give me 2.4-develop instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

We're seeing the same issue. Has anyone found a solution to this?

apparently this is the intended functionality, but I don't recall it happening before the update to 2.4.5

I have been attempting to get an instance of 2.4.3-p2 but so far haven't managed it

@magento give me 2.4.3-p2 instance

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

Hi @IanFiretoys, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@IanFiretoys you're right this is 100% a new issue on 2.4.5

There is also a related ticket open on the MSI repo: magento/inventory#3379

@engcom-Bravo

can you confirm that this is still considered desired behaviour or a bug introduced in 2.4.5?