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

12386: Order Status resets to default Status after Partial Refund. #20378

Merged
merged 3 commits into from
Apr 18, 2019
Merged

Conversation

nmalevanec
Copy link
Contributor

Original Pull Request

https://github.com/magento-engcom/magento2ce/pull/1056

Description

Now order keeps previous status after partial refund, in case it's state has not been changed.

Fixed Issues (if relevant)

  1. Order Status resets to default Status after Partial Refund #12386: Order Status resets to default Status after Partial Refund

Manual testing scenarios

  1. Create new Order Status: "Picking"
  2. Assign new State to Processing: "processing[Picking]", Do not check "Use Order Status As Default".
  3. Create simple product.
  4. Create order and Invoice with created product (qty = 2).
  5. Update order status from Processing to Picking.
  6. Refund part of order whilst in Picking Status(create Credit Memo with qty = 1).
  7. Observe order status remains "Picking".
  8. Refund remaining order items.
  9. Observe order status changes to "Closed".
  10. Repeat steps 4 and 5.
  11. Make API rest call POST /V1/order/{your_order_Id}/refund with body ex:
{
  "items": [
    {
      "order_item_id": {your_order_item_id},
      "qty": 1
    }
  ]
}
  1. Check order status in admin, it should remains "Picking".
  2. Repeat API call.
  3. Check order status become "Closed".

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)

@magento-engcom-team
Copy link
Contributor

Hi @nmalevanec. 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.3-develop instance - deploy vanilla Magento instance

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

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nmalevanec pretty cool pull request, dunno why it was abandoned 👍

# Conflicts:
#	app/code/Magento/Sales/Model/Order/Payment.php
#	dev/tests/integration/testsuite/Magento/Sales/Controller/Adminhtml/Order/Creditmemo/SaveTest.php
@VasylShvorak
Copy link
Contributor

✔️ QA passed

@m2-assistant
Copy link

m2-assistant bot commented Apr 18, 2019

Hi @nmalevanec, 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.

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.

4 participants