Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] Fixed Issue #20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20547

Conversation

irajneeshgupta
Copy link
Member

Original Pull Request

#20252
Fixed Issue #20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No

Preconditions

  1. Magento 2.2.6 Community
  2. Reproduced on PHP 7.1.18 and 7.1.25
  3. MariaDB 10.1.26 and 10.3.11
  4. Go to Stores -> Configuration -> Catalog -> Inventory and make sure the following options are set as per below:
  • Decrease Stock When Order is Placed to Yes
  • Set Items' Status to be In Stock When Order is Cancelled to No
  • Manage Stock to Yes
  • Automatically Return Credit Memo Item to Stock to No
    (see screenshot below)
    image

Steps to reproduce

  1. Place an order with 1 item of product (i.e. qty = 1)
  2. Cancel order

Expected result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity remains the same (i.e. does not increase) after order is canceled

Actual result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity is increased by 1 immediately after order is canceled

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Shikha Mishra and others added 2 commits January 23, 2019 19:14
Fixed Issue magento#20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No
@magento-engcom-team
Copy link
Contributor

Hi @irajneeshgupta. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

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

@magento-engcom-team magento-engcom-team added this to the Release: 2.2.8 milestone Jan 27, 2019
@magento-engcom-team
Copy link
Contributor

Hi @aleron75, thank you for the review.
ENGCOM-3978 has been created to process this Pull Request

@ghost
Copy link

ghost commented Jan 29, 2019

Hi @irajneeshgupta, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team pushed a commit that referenced this pull request Jan 29, 2019
…ck although "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20547
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.8 milestone Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants