Open adamlamaa opened 11 months ago
failed_at is an object so you would need to construct url like this:
http://localhost:9000/admin/batch-jobs?failed_at[gte]=2023-11-10T10:37:51.710Z
@chemicalkosek thank you, I am able to query the backend manually with your corrected url.
The useAdminBatchJobs hook is however not working, so I will leave this issue open for now.
Bug report
Batch Job filtering not working.
It seems that querying based on any of the date fields is not support at the moment. Also the calculated "status" field is not available for filtering either. Which could provide some workarounds.
Describe the bug
Trying to filter all batch jobs that have failed in e.g. the past week.
Using the below react hook just returns all batch jobs and ignores the limit and offset properties.
Pinging the api directly fails
http://localhost:9000/admin/batch-jobs?limit=20&offset=0&failed_at=gte:2023-11-10T10:37:51.710Z
http://localhost:9000/admin/batch-jobs?limit=20&offset=0&failed_at=2023-11-10
System information
Medusa version (including plugins):
Node.js version: 20.8 Database: Postgres Operating system: Mac Sonoma version 14.0