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

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

Closed
denzyk opened this issue Jan 8, 2019 · 9 comments
Assignees
Labels
Component: Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@denzyk
Copy link

denzyk commented Jan 8, 2019

We've recently run into issue where stock quantity is restored (increased back by 1) after the order has been canceled 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
@magento-engcom-team
Copy link
Contributor

Hi @denzyk. 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-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@denzyk do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jan 8, 2019
@ghost ghost self-assigned this Jan 8, 2019
@ghost ghost added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Jan 8, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 8, 2019

Hi @engcom-backlog-nazar. 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).

    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.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@denzyk
Copy link
Author

denzyk commented Jan 8, 2019

@magento-engcom-team give me 2.2.6 instance

@magento-engcom-team
Copy link
Contributor

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

@ghost ghost added Component: Catalog Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 8, 2019
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 8, 2019
@magento-engcom-team
Copy link
Contributor

@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97493, MAGETWO-97494 were created

@ghost ghost removed their assignment Jan 8, 2019
@irajneeshgupta irajneeshgupta self-assigned this Jan 9, 2019
@magento-engcom-team
Copy link
Contributor

Hi @irajneeshgupta. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

shikhamis11 pushed a commit to opencommerce/magento2 that referenced this issue Jan 11, 2019
Fixed Issue magento#20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No
@irajneeshgupta irajneeshgupta removed their assignment Jan 11, 2019
@routbiplab routbiplab self-assigned this Jan 21, 2019
@magento-engcom-team
Copy link
Contributor

Hi @routbiplab. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Jan 23, 2019
@magento-engcom-team
Copy link
Contributor

Hi @denzyk. Thank you for your report.
The issue has been fixed in #20252 by @shikhamis11 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

magento-engcom-team added a commit that referenced this issue Jan 23, 2019
… 'Set Items' Status to be In Stock When Order is Cancelled' is set to No #20252

 - Merge Pull Request #20252 from opencommerce/magento2:2.3developPRre20121
 - Merged commits:
   1. 473f907
magento-engcom-team added a commit that referenced this issue Jan 23, 2019
… 'Set Items' Status to be In Stock When Order is Cancelled' is set to No #20252

 - Merge Pull Request #20252 from opencommerce/magento2:2.3developPRre20121
 - Merged commits:
   1. 473f907
   2. 8d3fc5c
magento-engcom-team pushed a commit that referenced this issue Jan 23, 2019
… "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20252
irajneeshgupta pushed a commit to irajneeshgupta/magento2 that referenced this issue Jan 23, 2019
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 @denzyk. Thank you for your report.
The issue has been fixed in #20547 by @irajneeshgupta in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 29, 2019
magento-engcom-team added a commit that referenced this issue Jan 29, 2019
…ck although 'Set Items' Status to be In Stock When Order is Cancelled' is set to No #20547

 - Merge Pull Request #20547 from irajneeshgupta/magento2:2.2-develop-PR-port-20252
 - Merged commits:
   1. 331b5c1
   2. cc6b848
magento-engcom-team pushed a commit that referenced this issue Jan 29, 2019
…ck although "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20547
nirav-kadiya added a commit to nirav-kadiya/magento2 that referenced this issue Feb 1, 2019
* Escaped output of html attributes

* MAGETWO-97466: Refreshing checkout page deletes shipping address on guest checkout

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart

* meassage icon alignment issue resolved

* ENGCOM-3851: Static test fix.

* ENGCOM-3893: Static test fix.

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-97826: Skipped Randomly failing MFTF test AdminCheckingCreditMemoTotalsTest

* MAGETWO-97825: Skipped Randomly failing test AdminCreateCreditMemoWhenCartRuleDeletedTest

* Fixed-19800: Contact us : design improvement.

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* Fixed 19800 Contact us : design improvement

* ENGCOM-3763: Static test fix.

* Fixed-19791: Logo vertical misalignment.

* Fixed-Checkbox-Alignement: Checkbox alignment issue.

* MAGETWO-72879: Update product from mini shopping cart doesn't reflect in the shopping cart

* MAGETWO-96711: One page Checkout resets Customer data if Product Qty was changed

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* magento#18362: Fixed static tests

* Added constants to unit codes to make it easier to reuse it if necessary.

* ENGCOM-3774: Static test fix.

* MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout

* Fix negative credit memo bug caused by credit memo discount total calculator

* ENGCOM-3720: Static test fix.

* Added required error message.

If any JSON error occurs user will be be shown error message if the app mode is not in Production.

* Fixed Unused Local variable

* Fixed unused local variable

* Removed use of Class ObjectManager in Construct

* Updated to show error message to all Env.

* Update lib/internal/Magento/Framework/Serialize/Serializer/Json.php

Co-Authored-By: vinogcs <[email protected]>

* ENGCOM-3782: Static test fix.

* Add useful debug info for which website has not been found

* Add with code/with id text

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* MAGETWO-96815: There is no option to remove the Store Credit from the payment page of checkout

* Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content

Issue fixed magento#19985 Send email confirmation popup close button area overlapping to content

* Issue fixed magento#19985 Send email confirmation popup close button area overlapping

Issue fixed magento#19985 Send email confirmation popup close button area overlapping

* Order API resources updated.

* 'wishlist-page-edit-remove-item-misalign' :: On wish list page edit, remove item misalign in 640 X 767 resolution

* Order-view-invoices :: Order view invoices template not display proper on ipad

* Updated CancelOrderItemObserver.php

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

* ENGCOM-3845: Static test fix.

* MAGETWO-74604: Event clean_cache_by_tags didn't clean all tags pointed in getIdentity

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* MAGETWO-97899: [FT] [MFTF] AdminAvailabilityCreditMemoWithNoPaymentTest fails because of bad design

* MAGETWO-94157: Issue with products with customizable options

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-93832: Automate with MFTF Copy Single Update to Another Update

* MAGETWO-73598: CLONE - Quans: Orders API without key/value on ADDITIONAL_INFORMATION (only values)

* Static test fix.

* MAGETWO-95276: Varnish "Connection reset by peer" error when large catalog is reindexed on schedule

* MAGETWO-95176: Detaching category from product causes massive product url regeneration

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-73625: Products change in one category will cause cache miss for other categories (Only reproducible by unassigning products from backend category page)

* admin-order-info-issue2.2

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* Fix static test.

* MAGETWO-95176: Detaching category from product causes massive product url regeneration

* magento#20376 Fix issue with file uploading if an upload field is disabled

* magento#20461 Add translate component

* (Fixes issue magento#18027) Round the total amount to 4 decimal places, to avoid floating point overflows

* round the total amount only if it is float

* round base total amount

* cast formatted number to float

* thousand separator removed from number format

* use round instead of number_format to round the total amount

* unnecessary comments removed

* ENGCOM-3464: Static tests fixed.

* fixed Negative order amount in dashboard - magento#18754

* Fix static test.

* Update styles-old.less

* update-button-issue-while-updating-billing-and-shipping-address

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size

issue fixed magento#20563 Go to shipping information, Update qty & Addresses and Enter a new address button Not aligned from left and right in 767px screen size

* recent-order-product-title-misaligned

* Fix static tests.

* Fix static tests.

* MAGETWO-94348: The cart rule cannot affect the Bundle product with Fixed Price

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-95752: Unable to create Configurations for Configurable Products

* MAGETWO-94114: Cannot refresh Captcha image in production mode

* MQE-1420: Bump MFTF version in Magento

- MFTF version bump + allure-codeception dependency update.

* MQE-1420: Bump MFTF version in Magento

- changing argument from its own attribute to part of the command

* Fixed issue of Lifetime update syntax error

* Fix static test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Catalog Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

4 participants