As someone who wants to improve the experience of the Community Wishlist on wiki, I want to be able to query information about only wishes older or newer than a certain date (like `xxstart`/`xxend` in recentchanges, usercontribs, etc.) so my scripts won't have to query and comb through a whole list of wishes just to get information about newly added/updated wishes etc.
---
**Derived Requirements**
1. The CommunityRequests wishes API must support optional **start date** and **end date** query parameters to filter wishes based on creation or last update timestamp.
2. When a **start date** parameter is provided, the API must return only wishes created or updated on or after the specified date.
3. When an **end date** parameter is provided, the API must return only wishes created or updated on or before the specified date.
4. When both **start date** and **end date** parameters are provided, the API must return only wishes whose creation or update timestamps fall within the specified date range.
5. Date filtering must follow the same semantics and validation rules as existing MediaWiki APIs (e.x. `crwtags`).
6. When no start or end date parameters are provided, the API behavior must remain unchanged.
7. Invalid or malformed date parameters must result in a clear and consistent API error response.
8. Date filtering must apply consistently across paginated API responses.
====Test Steps
### Test Case 1: Query Wishes Using Start Date Parameter
**Preconditions**
* The CommunityRequests wishes API endpoint is accessible.
* At least one wish exists both before and after the selected start date.
1. Send a CommunityRequests wishes API request with a valid start date parameter.
2. Review the returned list of wishes.
3. Inspect the timestamps of each returned wish.
4. ✅❓❌⬜ **AC1:** Verify that only wishes created or updated on or after the specified start date are returned and that no older wishes are included.
### Test Case 2: Query Wishes Using End Date Parameter
**Preconditions**
* The CommunityRequests wishes API endpoint is accessible.
* At least one wish exists both before and after the selected end date.
1. Send a CommunityRequests wishes API request with a valid end date parameter.
2. Review the returned list of wishes.
3. Inspect the timestamps of each returned wish.
4. ✅❓❌⬜ **AC2:** Verify that only wishes created or updated on or before the specified end date are returned and that no newer wishes are included.
### Test Case 3: Query Wishes Using Start and End Date Range
**Preconditions**
* The CommunityRequests wishes API endpoint is accessible.
* Wishes exist both inside and outside the selected date range.
1. Send a CommunityRequests wishes API request with both start and end date parameters.
2. Review the returned list of wishes.
3. Inspect the timestamps of each returned wish.
4. ✅❓❌⬜ **AC3:** Verify that all returned wishes fall within the specified date range and that wishes outside the range are excluded.
### Test Case 4: API Behavior Without Date Parameters
**Preconditions**
* The CommunityRequests wishes API endpoint is accessible.
1. Send a CommunityRequests wishes API request without start or end date parameters.
2. Review the returned list of wishes.
3. Compare the response with the current baseline behavior.
4. ✅❓❌⬜ **AC4:** Verify that the API response matches the existing behavior with no date-based filtering applied.
### Test Case 5: Invalid Date Parameter Handling
**Preconditions**
* The CommunityRequests wishes API endpoint is accessible.
1. Send a CommunityRequests wishes API request with an invalid or malformed start or end date value.
2. Observe the API response.
3. ✅❓❌⬜ **AC5:** Verify that the API returns no results
### Test Case 6: Date Filtering with Other Filters
**Preconditions**
1. Send a CommunityRequests wishes API request with a valid start and/or end date and pagination parameters.
2.Add another filter (ex. crwtags)
3. ✅❓❌⬜ **AC6:** Verify that the API returns clear and consistent results