Skip to content

Conversation

dverkade
Copy link
Member

Description

This PR will show the number of items that are backordered for every order item in the order overview screen.

Fixed Issues

  1. Fixes Backend order overview screen: Backordered quantity not visible on order item level #38252

Manual testing scenarios

  1. Have a product which allows backorders.
  2. Create an order with a product that allows backorders and make sure there's no current inventory for that item.
  3. Order overview will show the quantity of the product that are in backorder.

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)
Copy link

m2-assistant bot commented Dec 27, 2023

Hi @dverkade. Thank you for your contribution!
Here are some useful tips on 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Dec 27, 2023
@dverkade
Copy link
Member Author

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

Copy link
Contributor

@rogyar rogyar left a comment

Choose a reason for hiding this comment

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

Hi @dverkade. Thanks a lot for your contribution. Please, check the failing static and functional tests. As for the functional tests - there's a classical issue where assertion is made on some child element. Once you've introduced a new child, the tests are failing. So, it's a matter of a simple test adjustment.

Thanks.

@dverkade
Copy link
Member Author

@rogyar I've changed the template to pass the static tests. Regarding the functional test failing, that's not an issue of this commit as the commit is for the Sales module and displaying the backordered quantity on the order overview page. The failing functional test is for: "on page /admin/catalog/product/index" which is a false positive.

Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

@dverkade Thanks for contribution.
Please look at my comment

Comment on lines 16 to 17
<th><?= $block->escapeHtml(__('Backordered')); ?></th>
<td><?= (float) $item->getQtyBackordered() ?></td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Using escape functions from the Template class was deprecated. Please use $escaper.
It would be good replace all calls in this file.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@Den4ik I have updated the code as requested in comment. Requesting for the review.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, WebAPI Tests

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

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

Failed tests seem flaky to me, hence approving the PR.

Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

Now looks good for me.
@engcom-Charlie Thanks for update

@engcom-Bravo
Copy link
Contributor

@magento run all tests

@engcom-Bravo
Copy link
Contributor

Hi @dverkade,

Thanks for the collaboration & contribution!

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Steps to reproduce

  • Have a product which allows backorders.
  • Create an order with a product that allows backorders and make sure there's no current inventory for that item.
  • Order overview will show the quantity of the product that are in backorder.

Before: ✖️ 

Screenshot 2024-06-03 at 12 05 04

After: ✔️  

Screenshot 2024-06-03 at 12 13 46

Builds are failed. Hence, moving this PR to Extended Testing.

Thanks.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE, WebAPI Tests

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Jun 4, 2024

The Functional B2B, EE, WebAPI tets failures seems to be flaky and having known issues in it. Hence moving this PR to Merge in Progress.

WebAPI Run 1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/6693de30abf00cfa6ba6a93ca5b85925/WebApi/console-error-logs.html
image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/7295c536f85ba01de73294e474a74599/WebApi/console-error-logs.html
image

Known Issues:
testSendNegotiableQuoteCannotResend: #ACP2E-3082

Functional B2B Run1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/48cb80f610e8053ca7b9755464763a5b/Functional/allure-report-b2b/index.html
image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/98c0e44ef5a3b8a97e14b05077128232/Functional/allure-report-b2b/index.html#categories
image

Known Issues:
AdminReorderWithCatalogPriceRuleDiscountTest: ACQE-6523
StorefrontUpdateCustomerAddressBelgiumTest: ACQE-6648

Functional EE Run 1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/22ec2fa6c97d8ce03fb372c477c87b0c/Functional/allure-report-ee/index.html#categories
image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/38320/7f17651c7487cce2ff05e5ab10a7c239/Functional/allure-report-ee/index.html#categories
image

Known Issues:
AdminCheckConfigurationForPayPalExpressCheckoutInUnitesStatesTest: ACQE-6590
StorefrontCreateOrderAllQuantityGroupedProductOptionDefaultStockTest : ACQE-6331
AdminReorderWithCatalogPriceRuleDiscountTest: ACQE-6523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Project: Community Picked PRs upvoted by the community
8 participants