magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Adding created_at, status and grand_total filters to customer Orders query and fixing multiple filters failure

Open venchiarutti opened this issue 1 year ago • 18 comments

Description (*)

Added created_at, status, and grand_total filters to customer Orders query Fixing multiple filters bug in this query, when adding one more filter in the array for filterGroupBuilder addFilters it doesn´t apply all filters

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento2#38392

Manual testing scenarios (*)

  1. Create an order with a customer
  2. With the same customer, generate a customer token and call the customer Orders query
  3. Create multiple orders to test filters
  4. Use two or more filters to check if multiple are being applied

Questions or comments

I did not find a unit test for this class, does it exist?

I used the same names from the output object to maintain the pattern

I accept any suggestions or critics, doing it you are helping me!

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)

venchiarutti avatar Mar 02 '23 22:03 venchiarutti

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

:exclamation: 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 :information_source: 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-assistant[bot] avatar Mar 02 '23 22:03 m2-assistant[bot]

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run all tests

venchiarutti avatar Mar 08 '23 02:03 venchiarutti

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento run all tests

andrewbess avatar Jan 23 '24 07:01 andrewbess

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.

@magento run Static Tests

andrewbess avatar Jan 23 '24 08:01 andrewbess

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.

@magento run Static Tests

engcom-Charlie avatar Jan 25 '24 06:01 engcom-Charlie

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.

@magento create issue

engcom-Charlie avatar Jan 29 '24 10:01 engcom-Charlie

Hi @venchiarutti,

Thank you for your contribution!

In order to proceed further, can you please look into the Static test failure.

Thank you!

engcom-Charlie avatar Jan 29 '24 11:01 engcom-Charlie

It seems that bot moved this PR to testing hence moving it back to Change Requested.

@venchiarutti, can you please have a look into this comment and do the needful.

Thank you!

engcom-Charlie avatar Jan 30 '24 13:01 engcom-Charlie

@magento run Static Tests

venchiarutti avatar Jan 30 '24 20:01 venchiarutti

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.

I don't know what may be causing these errors in the tests, I would appreciate some help @engcom-Charlie

venchiarutti avatar Jan 31 '24 19:01 venchiarutti

@magento run all tests

engcom-Charlie avatar Feb 26 '24 05:02 engcom-Charlie

@magento run all tests

engcom-Charlie avatar Mar 20 '24 07:03 engcom-Charlie

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

engcom-Charlie avatar Mar 20 '24 10:03 engcom-Charlie

@magento run all tests

engcom-Charlie avatar Mar 20 '24 10:03 engcom-Charlie

@magento run Functional Tests B2B, Functional Tests EE

engcom-Charlie avatar Mar 21 '24 06:03 engcom-Charlie

The functional B2B and Functional EE test failures are different in recent 2 runs. It seems to be flaky. Hence moving this PR to testing.

Functional B2B Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/d4a8ff37aa03dfb6987d30b2264a5268/Functional/allure-report-b2b/index.html#categories image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/783d2df354d1f5891f44661b8136c7f9/Functional/allure-report-b2b/index.html#categories/3ae677d8e6673a8efa39994732ea996b/e4d89e84c1a662bd/ image

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

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/0a5681974428b092ccbc5ded0d4501a1/Functional/allure-report-ee/index.html#categories Uploading image.png…

engcom-Charlie avatar Mar 21 '24 10:03 engcom-Charlie

:heavy_check_mark: QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Manual testing scenario:

1.Create an order with a customer 2.With the same customer, generate a customer token and call the customer Orders query 3.Create multiple orders to test filters 4.Use two or more filters to check if multiple are being applied

Before: :heavy_multiplication_x: 

Screenshot 2024-04-05 at 2 24 29 PM Screenshot 2024-04-05 at 2 23 16 PM

After: :heavy_check_mark:  

Screenshot 2024-04-05 at 2 25 20 PM Screenshot 2024-04-05 at 2 25 57 PM Screenshot 2024-04-05 at 2 26 33 PM Screenshot 2024-04-05 at 2 27 04 PM Screenshot 2024-04-05 at 2 27 41 PM Screenshot 2024-04-05 at 2 28 15 PM Screenshot 2024-04-05 at 2 29 28 PM Screenshot 2024-04-05 at 2 30 23 PM

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

engcom-Delta avatar Apr 05 '24 09:04 engcom-Delta

@magento run all tests

engcom-Charlie avatar Apr 05 '24 09:04 engcom-Charlie

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

engcom-Charlie avatar Apr 08 '24 06:04 engcom-Charlie

The functional B2B failures except AdminAssignCompaniesTest and AdminCompanyRelationsInCompanyIndexGridTest are different in recent 2 builds. For these 2, there are open issues ACQE-6363, ACQE-6364

Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/b0b53ee1a20af547cafe51557850f139/Functional/allure-report-b2b/index.html#categories image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/c5bd3507dbdbfafb123d6980ad97e9fc/Functional/allure-report-b2b/index.html#categories/e847f4a0aaffc342329492c79cacfbad/f4a8a69b474f25f5/ image

  1. Functional CE failures are different in recent 2 builds. Seems to be flaky. Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/b8191553fb821607f8ccec58e3f9e147/Functional/allure-report-ce/index.html#categories image

Run 2: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/3540509c851b511bcf235def01f86df1/Functional/allure-report-ce/index.html#categories image

engcom-Charlie avatar Apr 08 '24 09:04 engcom-Charlie

@magento run Functional Tests EE

engcom-Charlie avatar Apr 08 '24 09:04 engcom-Charlie

The functional EE failures are differnt in latest 2 builds except StorefrontCreateOrderAllQuantityGroupedProductOptionDefaultStockTest. This bug its not occurring because of this PR and also there is an open issue exists. Moving this PR to Merge in Progress now.

Run 1: https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/36949/8a5e351fb6e507c18fe127e5ae5ce933/Functional/allure-report-ee/index.html image

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

engcom-Charlie avatar Apr 08 '24 09:04 engcom-Charlie