Skip to content

magento/magento2#28957: GraphQl. Mutation: customerOrders query and gift_message attribute #28958

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

Merged

Conversation

atwixfirster
Copy link
Contributor

@atwixfirster atwixfirster commented Jul 1, 2020

Description (*)

PR fixes #28957

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes magento/magento228957: GraphQl. Mutation: customerOrders query and gift_message attribute

Manual testing scenarios (*)

  1. Magento (2.4-develop) with a sample data
  2. Generate customer token:
mutation {
  generateCustomerToken(
    email: "[email protected]"
    password: "[email protected]"
  ) {
    token
  }
}
  1. Retrieve customer orders:
query {
    customerOrders {
        items {
            order_number
            gift_message {
                to
                from
                message
            }
        }
    }
}

Questions or comments

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Jul 1, 2020

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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Component: GiftMessageGraphQl Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jul 1, 2020
@dmytro-ch dmytro-ch self-assigned this Jul 1, 2020
@atwixfirster
Copy link
Contributor Author

@magento run all tests

@atwixfirster
Copy link
Contributor Author

@magento run Database Compare

@atwixfirster
Copy link
Contributor Author

@magento run WebAPI Tests

@atwixfirster
Copy link
Contributor Author

@magento run Unit Tests

@atwixfirster
Copy link
Contributor Author

@magento Static Tests

@atwixfirster
Copy link
Contributor Author

@magento run Semantic Version Checker

@atwixfirster
Copy link
Contributor Author

@magento run Functional Tests B2B

@atwixfirster
Copy link
Contributor Author

@magento run Sample Data Tests EE Sample Data Tests CE Sample Data Tests B2B Magento Health Index

@dmytro-ch dmytro-ch added the Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests label Jul 3, 2020
Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

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

Hello @atwixfirster, thank you for your contribution.
The overall changes look good to me.
Could you please cover this case by an appropriate functional test?

@ghost ghost added the Priority: P3 May be fixed according to the position in the backlog. label Aug 15, 2020
@sivaschenko
Copy link
Member

Hi @nrkapoor , what is the reason for putting this PR on hold? Should it be processed according to priority or any additional actions are required?

@sivaschenko
Copy link
Member

customerOrders query is deprecated:

customerOrders: CustomerOrders @resolver(class: "Magento\\SalesGraphQl\\Model\\Resolver\\Orders") @deprecated(reason: "Use orders from customer instead") @cache(cacheable: false)

Need to check if the issue is reproducible with customer orders and update the issue and PR testing steps accordingly

@dmytro-ch dmytro-ch removed their assignment Nov 6, 2020
@dmytro-ch dmytro-ch self-requested a review November 6, 2020 16:46
@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Apr 8, 2022
@m2-community-project m2-community-project bot added the Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. label Apr 8, 2022
}

if (!isset($orderGiftMessage)) {
if (!$orderGiftMessage->getGiftMessageId()) {
Copy link
Contributor

@cpartica cpartica May 6, 2022

Choose a reason for hiding this comment

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

I think this change needs a test, plus we need to fix webAPI tests which are failing

@engcom-Alfa
Copy link
Contributor

We raised internal PR- https://github.com/magento-gl/magento2ce/pull/290 along with this PR commits, covering the automation tests and resolved PR comments.
Once Internal PR will get merged will notify here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Component: GiftMessageGraphQl Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Priority: P3 May be fixed according to the position in the backlog. Progress: on hold Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQl. Mutation: customerOrders query and gift_message attribute
8 participants