[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}

ACSD-60326:對客戶Returns狀態的GraphQL查詢發生錯誤

ACSD-60326修補程式修正了客戶Returns狀態的GraphQL查詢中發生錯誤的問題。 安裝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作為搜尋關鍵字,以尋找修補程式。

問題

對客戶Returns狀態的GraphQL查詢發生錯誤。

要再現的步驟

  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 — 紫色

    • 按一下​ Add Selected Products to returns

      • 設定​ Requested = 1
      • 將​ Return Reason ​設為​ 服務不足
      • 將​ Item Condition ​設為​ 已開啟
      • 將​ Resolution ​設為​ 退款
    • 按一下​ Submit Returns

  9. 開啟​ Returns ​並選取左側的​ Return Items

    • 設定兩個產品的​ Authorized = 1
    • 將​ Status ​設定為​ WSH12-32-Purple ​的​ 已授權
    • 將​ Status ​設定為​ WSH12-32-Red ​的​ Denied
    • 按一下​ Save
  10. 使用相同的產品建立新訂單。

  11. 為相同的產品建立​ InvoiceShipment ​和​ Returns。 授權兩者並繼續,直到Returns程式結束。

  12. 使用下列GraphQL查詢產生客戶Token:

    code language-graphql
     mutation {
      generateCustomerToken(email: "roni_cost@example.com", password: "password") {
        token
       }
    }
    
  13. 使用接收的Token進行授權並執行下列查詢:

    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