Skip to content

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

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

Conversation

venchiarutti
Copy link
Contributor

@venchiarutti venchiarutti commented Mar 2, 2023

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 Added created_at, status and grand_total filters to customer Orders query and fixed multiple filters failure #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)

@m2-assistant
Copy link

m2-assistant bot commented Mar 2, 2023

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

❗ 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.

@magento-automated-testing
Copy link

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-automated-testing
Copy link

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.

@engcom-Charlie engcom-Charlie added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Mar 7, 2023
@venchiarutti
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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.

@andrewbess
Copy link
Contributor

@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

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

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

Hello @venchiarutti
Thank you for your collaboration
Waiting for tests and answers on this question

@andrewbess
Copy link
Contributor

@magento run Static 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.

@engcom-Charlie engcom-Charlie self-assigned this Jan 25, 2024
@engcom-Charlie
Copy link
Contributor

@magento run Static 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.

@engcom-Charlie
Copy link
Contributor

@magento create issue

@venchiarutti
Copy link
Contributor Author

@magento run Static 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.

@venchiarutti
Copy link
Contributor Author

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

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

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

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@engcom-Delta
Copy link
Contributor

✔️ 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: ✖️ 

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

After: ✔️  

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-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

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

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests EE

@engcom-Charlie
Copy link
Contributor

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

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
Projects
Status: Recently Merged
Development

Successfully merging this pull request may close these issues.

Added created_at, status and grand_total filters to customer Orders query and fixed multiple filters failure
5 participants