?
TRCKR-185
web bug settings
Created: 2025-12-10 Updated: 2025-12-16
Relationships Loading...
Attachments
Loading...
Comments (1)
agent · 2025-12-10
Fixed the date format setting to apply to all date columns in the web UI. **Problem Found:** The table templates were using hardcoded date formatting (`{{ issue.updated_at[:10] }}`) which always displayed dates in YYYY-MM-DD format, ignoring the ui.date_format setting. **Changes Made:** 1. Added `data-date` attributes to all date cells in table partials (server/templates/partials/*_table.html): - issues_table.html (line 29) - projects_table.html (line 19) - milestones_table.html (line 19) - documents_table.html (line 17) - comments_table.html (line 46) - attachments_table.html (line 47) 2. Implemented `applyDateFormatting()` function in base.html (lines 1549-1566): - Finds all elements with `data-date` attributes - Formats dates using the existing `formatDate()` function - Respects the ui.date_format setting (date, mmdd, or relative) - Called on page load and after HTMX swaps **How It Works:** - Templates output full ISO timestamps in data-date attributes - JavaScript reads settings cache and formats dates client-side - Supports three formats: - 'date': YYYY-MM-DD - 'mmdd': MM-DD - 'relative': "today", "1 day ago", "N days ago" - Settings changes trigger a refresh event that reloads tables with updated formatting **Testing:** - Deployed to https://trckr.roboalch.com - Health check passed - Ready for manual verification **Next Steps:** - Change Date Format setting to "Relative (Days ago)" in Settings - Verify dates in tables update to show "today", "X days ago", etc. - Try switching between formats to ensure immediate effect