Strip time from date filter values in saved view tokens
What does this MR do and why?
When a saved view is loaded, date filters (Closed date, Created date, Due date, Updated date) are stored in the backend as full ISO 8601 datetime strings (e.g. 2025-01-01T00:00:00.000+00:00). When getSavedViewFilterTokens in app/assets/javascripts/work_items/list/utils.js converts these back into filter tokens, the raw datetime string was passed through convertToTokenValue unchanged (hitting the default case). The filtered search bar chip then rendered the full datetime string including the time component, instead of just the date.
This MR adds cases for TOKEN_TYPE_CLOSED, TOKEN_TYPE_CREATED, TOKEN_TYPE_DUE_DATE, and TOKEN_TYPE_UPDATED in convertToTokenValue that slice the value to the YYYY-MM-DD portion using .slice(0, 10). This is safe for both full ISO strings and plain date strings (a no-op on a 10-character input), so regular listing pages that read dates from URL params are unaffected.
References
- Closes #617376 (closed)
Screenshots or screen recordings
| View | Before | After |
|---|---|---|
| All items (unchanged) | ![]() |
![]() |
| Saved View | ![]() |
![]() |
How to set up and validate locally
- Create a saved view with a date filter (e.g. Closed date before 2026-01-01)
- Load the saved view
- Observe the chip in the search bar shows only the date (e.g.
2026-01-01) without the time component
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


