Skip to content

[Issue] Ensure that invoice comments are returned when requested by GraphQL queries #31866

@m2-assistant

Description

@m2-assistant

This issue is automatically created based on existing pull request: #31606: Ensure that invoice comments are returned when requested by GraphQL queries


Description (*)

As part of the GraphQL schema for customer orders, invoices can be requested, along with their comments. However, the current implementation does not return any comments for invoices, resulting in a null value always.
This pull request ensures that invoice comments (that are visible in the front-end) are returned when requested in the query.

Fixed Issues (if relevant)

  1. Fixes magento/magento2#<issue_number>

Manual testing scenarios (*)

  1. Create a customer order and an associated invoice.
  2. Add a number of comments to an order invoice, including both visible and not visible in the front-end.
  3. Call the customer GraphQL query, requesting orders, invoices and their associated comments - e.g:
query {
    customer {
        orders(filter: { number: { eq: "000000154" } }) {
            items {
                invoices {
                    comments {
                        message
                        timestamp
                    }
                    items {
                        product_name
                    }
                }
            }
        }
    }
}

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)

Resolved issues:

  1. resolves [Issue] Ensure that invoice comments are returned when requested by GraphQL queries #31643: Ensure that invoice comments are returned when requested by GraphQL queries

Metadata

Metadata

Labels

Component: SalesGraphQlPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions