|
| 1 | +--- |
| 2 | +title: 'ACSD-67093: Retrieving orders through GraphQL using the date range filter returns incorrect results' |
| 3 | +description: Apply the ACSD-67093 patch to fix the Adobe Commerce issue where retrieving orders through GraphQL using the date range filter returns incorrect results. |
| 4 | +feature: GraphQL, Orders |
| 5 | +role: Admin, Developer |
| 6 | +type: Troubleshooting |
| 7 | +--- |
| 8 | +# ACSD-67093: Retrieving orders through [!DNL GraphQL] using the date range filter returns incorrect results. |
| 9 | + |
| 10 | +The ACSD-67093 patch fixes the issue where retrieving orders through GraphQL using the date range filter returns incorrect results. This patch is available when the [[!DNL Quality Patches Tool (QPT)]](/help/tools/quality-patches-tool/quality-patches-tool-to-self-serve-quality-patches.md) 1.1.70 is installed. The patch ID is ACSD-67093. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9. |
| 11 | + |
| 12 | +## Affected products and versions |
| 13 | + |
| 14 | +**The patch is created for Adobe Commerce version:** |
| 15 | + |
| 16 | +* Adobe Commerce (all deployment methods) 2.4.8-p2 |
| 17 | + |
| 18 | +**Compatible with Adobe Commerce versions:** |
| 19 | + |
| 20 | +* Adobe Commerce (all deployment methods) 2.4.8 - 2.4.8-p2 |
| 21 | + |
| 22 | +>[!NOTE] |
| 23 | +> |
| 24 | +>The patch might become applicable to other versions with new [!DNL Quality Patches Tool] releases. To check if the patch is compatible with your Adobe Commerce version, update the `magento/quality-patches` package to the latest version and check the compatibility on the [[!DNL Quality Patches Tool]: Search for patches page](https://experienceleague.adobe.com/tools/commerce-quality-patches/index.html). Use the patch ID as a search keyword to locate the patch. |
| 25 | +
|
| 26 | +## Issue |
| 27 | + |
| 28 | +GraphQL date range filter returns incorrect orders results. |
| 29 | + |
| 30 | +<u>Steps to reproduce</u>: |
| 31 | + |
| 32 | +1. Create a product. |
| 33 | +1. Create a customer and place an order. |
| 34 | +1. Update the order or wait for a day. |
| 35 | + |
| 36 | + ``` |
| 37 | + UPDATE sales_order |
| 38 | + SET created_at = '2025-07-01 12:00:00', |
| 39 | + updated_at = '2025-07-01 12:00:00' |
| 40 | + WHERE entity_id = 1; |
| 41 | +
|
| 42 | + UPDATE sales_order_grid |
| 43 | + SET created_at = '2025-07-01 12:00:00', |
| 44 | + updated_at = '2025-07-01 12:00:00' |
| 45 | + WHERE entity_id = 1; |
| 46 | + ``` |
| 47 | + |
| 48 | + >[!NOTE] |
| 49 | + > |
| 50 | + >Add current date or "current date - 1 day" to the `created_at` and `updated_at` field values. |
| 51 | +
|
| 52 | +1. Place a new order without changing the date. |
| 53 | +1. Create a customer token. |
| 54 | +1. Filter all orders by their order dates. |
| 55 | +
|
| 56 | + ``` |
| 57 | + query{ |
| 58 | + customer{ |
| 59 | + orders(pageSize: 10, currentPage: 1, filter: { order_date: { |
| 60 | + from: "2025-07-21", to: "2025-07-24" } }) { items { order_number created_at status grand_total }, total_count } } } |
| 61 | + ``` |
| 62 | +
|
| 63 | + >[!NOTE] |
| 64 | + > Set `from` date field to the current date, and the `to` date field to the "current date + 2 days". |
| 65 | + > |
| 66 | + > Example: `from: "2025-07-21"`, `to: "2025-07-24"` (if today is 2025-07-21). |
| 67 | +
|
| 68 | +<u>Expected results</u>: |
| 69 | +
|
| 70 | +Only the filtered date should be returned. |
| 71 | +
|
| 72 | +<u>Actual results</u>: |
| 73 | +
|
| 74 | +All orders are returned |
| 75 | +
|
| 76 | +## Apply the patch |
| 77 | +
|
| 78 | +To apply individual patches, use the following links depending on your deployment method: |
| 79 | +
|
| 80 | +* Adobe Commerce or Magento Open Source on-premises: [[!DNL Quality Patches Tool] > Usage](/help/tools/quality-patches-tool/usage.md) in the [!DNL Quality Patches Tool] guide. |
| 81 | +* Adobe Commerce on cloud infrastructure: [Upgrades and Patches > Apply Patches](https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/upgrade/apply-patches.html) in the Commerce on Cloud Infrastructure guide. |
| 82 | +
|
| 83 | +## Related reading |
| 84 | +
|
| 85 | +To learn more about [!DNL Quality Patches Tool], refer to: |
| 86 | +
|
| 87 | +* [[!DNL Quality Patches Tool]: A self-service tool for quality patches](/help/tools/quality-patches-tool/quality-patches-tool-to-self-serve-quality-patches.md) in the Tools guide. |
0 commit comments