Skip to content

magento/magento2#37803: Customer order filters graphql #38079

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

Closed
wants to merge 14 commits into from

Conversation

serbynskyi
Copy link
Contributor

@serbynskyi serbynskyi commented Oct 13, 2023

Description (*)

Fixed Issue

  1. Fixes customer order filters graphql #37803

Manual testing scenarios (*)

1.Create a new Module CustomerOrder.
2.Create a schema.graphqls in Teeela/CustomerOrder/etc/ folder to extend the CustomerOrderFilterInput.
Put following codes in this file:

input CustomerOrdersFilterInput @doc(description: "Identifies the filter to use for filtering orders.") {
number: FilterStringTypeInput @doc(description: "Filters by order number.")
created_at: FilterRangeTypeInput @doc(description: "Filters by created at.")
status: FilterEqualTypeInput @doc(description: "Filters by status.")
}

input FilterRangeTypeInput @doc(description: "Defines a filter that matches a range of values, such as prices or dates.") {
from: String @doc(description: "The beginning of the range")
to: String @doc(description: "The end of the range")
}

input FilterEqualTypeInput @doc(description: "Defines a filter that matches the input exactly.") {
in: [String] @doc(description: "An array of values to filter on")
eq: String @doc(description: "A string to filter on")
}
3.Use the following payload and {{your URL}}/graphql to query the customer token.

mutation {
generateCustomerToken(email: "{{your email address}}", password: "{{your password}}") {
token
}
}
4.Put above token in Postman Headers Authorization with Bearer {{your token}}.
5.Use following payload to query the above customer's sales orders.

query {
customer {
orders(filter: { created_at: { from: "2023-07-22" } status:{ in:["Processing"]} })
{
items {
number
created_at
}
}
}


Result:
orders from 2023-07-22 and status Processing

### 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](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update
 - [ ] All automated tests passed successfully (all builds are green)


### Resolved issues:
1. [x] resolves magento/magento2#38371: magento/magento2#37803: Customer order filters graphql

### Resolved issues:
1. [x] resolves magento/magento2#38372: magento/magento2#37803: Customer order filters graphql

@m2-assistant
Copy link

m2-assistant bot commented Oct 13, 2023

Hi @serbynskyi. 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-github-services m2-github-services added Partner: Perspective Team partners-contribution Pull Request is created by Magento Partner labels Oct 13, 2023
@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review labels Oct 13, 2023
@shikhamis11 shikhamis11 self-requested a review October 15, 2023 02:55
@shikhamis11
Copy link
Member

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

@shikhamis11
Copy link
Member

@serbynskyi thank you for your Pull request. Can you also cover your changes with the web API function test?

@venchiarutti
Copy link
Contributor

venchiarutti commented Oct 19, 2023

Hey! take a look at this one: #36949 @serbynskyi

@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Nov 17, 2023
@engcom-Hotel
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.

@engcom-Hotel
Copy link
Contributor

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

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

@magento run Functional Tests CE

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

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

Hello @serbynskyi,

Thanks for the contribution!

The Changes looks good to me and the failed test seems flaky to me. But please cover the changes with some automated test in accordance with DOD.

Thanks

@engcom-Charlie
Copy link
Contributor

Working on web API test coverage.

@engcom-Echo
Copy link
Contributor

@magento create issue

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 @serbynskyi
Thank you for contribution
Looks good for me
Approved

@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo engcom-Echo self-assigned this Jan 23, 2024
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.

@andrewbess
Copy link
Contributor

@magento create issue

Hello @engcom-Echo
The issue has already created (#37803)
Let's avoid to create redundant ones

I'll close last one

@engcom-Echo
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Manual testing scenario:

  1. We have follow steps from comment
Screenshot 2024-01-23 at 1 23 14 PM

Before: ✖️ 
Screenshot 2024-01-23 at 1 23 06 PM

After: ✔️  
Screenshot 2024-01-23 at 1 24 56 PM

Builds are failing. Hence moving it to Extended Testing

@andrewbess
Copy link
Contributor

andrewbess commented Jan 23, 2024

Hey guys.
Sorry, but I missed one comment in this PR
It looks we already have a similar PR

Which PR we need to choice for merging?
I think it should be #36949

  • it was created earlier
  • it is more relevant due to has fixes for graphql.schema

What do you think @engcom-Hotel @engcom-Echo @shikhamis11 about my suggestion?

@andrewbess
Copy link
Contributor

Hey guys. Sorry, but I missed one comment in this PR It looks we already have a similar PR

Which PR we need to choice for merging? I think it should be #36949

  • it was created earlier
  • it is more relevant due to has fixes for graphql.schema

What do you think @engcom-Hotel @shikhamis11 about my suggestion?

or we can combine both PRs

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

Hi @andrewbess,

Thank you for the information

We will take #36949 PR further as the schema changes are in place.

Till then keeping this PR to On Hold until #36949 will get merge.

Thank you!

@engcom-Charlie
Copy link
Contributor

As mentioned in this comment, the required changes has been taken care in #36949 and it got merged in 0a41d1a hence closing this PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Perspective Team partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

customer order filters graphql
10 participants