[仅限PaaS]{class="badge informative" title="仅适用于云项目(Adobe管理的PaaS基础架构)和内部部署项目上的Adobe Commerce 。"}

ACSD-60326:对客户Returns状态的GraphQL查询出错

ACSD-60326修补程序修复了GraphQL查询客户Returns状态时出现错误的问题。 安装Quality Patches Tool (QPT) 1.1.51时,此修补程序可用。 修补程序ID为ACSD-60326。 请注意,该问题计划在Adobe Commerce 2.4.8中修复。

受影响的产品和版本

为Adobe Commerce版本创建了修补程序:

  • Adobe Commerce(所有部署方法) 2.4.6-p2

与Adobe Commerce版本兼容:

  • Adobe Commerce(所有部署方法) 2.4.4 - 2.4.7-p2
NOTE
该修补程序可能适用于具有新Quality Patches Tool发行版本的其他版本。 要检查修补程序是否与您的Adobe Commerce版本兼容,请将magento/quality-patches包更新到最新版本,并在Quality Patches Tool:搜索修补程序页面上检查兼容性。 使用修补程序ID作为搜索关键字来查找修补程序。

问题

GraphQL对客户Returns状态的查询出错。

重现步骤

  1. 使用示例数据初始化新实例。

  2. 在​ Admin ​侧边栏上,转到​ Stores > Settings > Configuration > Sales > RMA Settings,并将​ Enable RMA on Storefront ​设置为​

  3. 转到​ Sales > Shipping Settings > Origin ​并填写地址。

  4. 更改客户roni_cost@example.com的密码。

  5. 登录到管理面板,为客户roni_cost@example.com订购以下产品:

    • WSH12-32-Red
    • WSH12-32 — 紫色
    • WSH12-32 — 绿色
  6. 为此订单创建一个​ Invoice ​和​ Shipment

  7. 选择​ Create Returns

  8. 转到​ Return Items > Add Items ​并:

    • 选择​ WSH12-32-Red ​和​ WSH12-32-Purple

    • 单击​ Add Selected Products to returns

      • 设置​ Requested = 1
      • 将​ Return Reason ​设置为​ 服务
      • 将​ Item Condition ​设置为​ 已打开
      • 将​ Resolution ​设置为​ 退款
    • 单击​ Submit Returns

  9. 打开​ Returns ​并选择左侧的​ Return Items

    • 为两个产品设置​ Authorized = 1
    • 将​ Status ​设置为​ WSH12-32-Purple ​的​ Authorized
    • 将​ Status ​设置为​ WSH12-32-Red ​的​ 拒绝
    • 单击​ Save
  10. 创建具有相同产品的新订单。

  11. 为相同产品创建​ InvoiceShipment ​和​ Returns。 授权并继续,直到Returns进程结束。

  12. 使用以下GraphQL查询生成客户令牌:

    code language-graphql
     mutation {
      generateCustomerToken(email: "roni_cost@example.com", password: "password") {
        token
       }
    }
    
  13. 使用收到的令牌进行授权并执行以下查询:

    code language-none
    {
    customer {
        returns(pageSize: 20, currentPage: 1) {
         total_count
            items {
                uid
                number
                status
                created_at
            }
        }
    }
    }
    

预期的结果

查询未显示任何错误。 第二次返回的状态不是​ null

实际结果

查询返回内部服务器错误:

    {
    "errors": [
        {
            "message": "Internal server error",
            "locations": [
                {
                    "line": 8,
                    "column": 5
                }
            ],
            "path": [
                "customer",
                "returns",
                "items",
                1,
                "status"
            ]
        }
    ],
    "data": {
        "customer": {
            "returns": {
                "total_count": 2,
                "items": [
                    {
                        "uid": "MQ==",
                        "number": "000000001",
                        "status": "PARTIALLY_AUTHORIZED",
                        "created_at": "2024-07-09 10:35:55"
                    },
                    {
                        "uid": "Mg==",
                        "number": "000000002",
                        "status": null,
                        "created_at": "2024-07-09 10:50:02"
                    }
                ]
            }
        }
    }
    }

应用修补程序

要应用单独的修补程序,请根据您的部署方法使用以下链接:

相关阅读

要了解有关Quality Patches Tool的更多信息,请参阅:

有关QPT中其他可用修补程序的信息,请参阅Quality Patches Tool指南中的:搜索修补程序Quality Patches Tool。

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3