From c9ca83a0d4b4f1fef6971b2d22a9941ab735f4cf Mon Sep 17 00:00:00 2001
From: Stephen Jolly <708189+elvum@users.noreply.github.com>
Date: Fri, 17 Jul 2026 06:19:57 +0100
Subject: [PATCH] fix(transactions): show full dates in the categorize wizard
(#2633)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The categorize view renders dates with :short (\"%b %d\"), which omits the
year — ambiguous when the uncategorized backlog spans more than one year.
Use format_date, which renders the family's Settings date format; every
selectable format includes the year.
---
.../transactions/categorizes/_entry_row.html.erb | 2 +-
.../transactions/categorizes_controller_test.rb | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/app/views/transactions/categorizes/_entry_row.html.erb b/app/views/transactions/categorizes/_entry_row.html.erb
index daba95b7f..16180bdc3 100644
--- a/app/views/transactions/categorizes/_entry_row.html.erb
+++ b/app/views/transactions/categorizes/_entry_row.html.erb
@@ -6,7 +6,7 @@
aria-label="<%= t("transactions.categorizes.entry_row.include_checkbox", name: entry.name) %>"
data-action="change->categorize#uncheckRule">
<%= entry.name %>
- <%= l(entry.date, format: :short) %>
+ <%= format_date(entry.date) %>
">
<%= format_money(entry.amount_money.abs) %>
diff --git a/test/controllers/transactions/categorizes_controller_test.rb b/test/controllers/transactions/categorizes_controller_test.rb
index a3628543e..1e74d8bbb 100644
--- a/test/controllers/transactions/categorizes_controller_test.rb
+++ b/test/controllers/transactions/categorizes_controller_test.rb
@@ -26,6 +26,19 @@ class Transactions::CategorizesControllerTest < ActionDispatch::IntegrationTest
assert_response :success
end
+ test "show renders full dates so multi-year lists are unambiguous" do
+ create_transaction(account: @account, name: "Starbucks", date: Date.new(2024, 7, 8))
+
+ get transactions_categorize_url
+
+ assert_response :success
+ # format_date uses the family's date_format preference, every variant of
+ # which includes the year; the previous :short format ("%b %d") did not,
+ # making rows ambiguous when the uncategorized list spans years.
+ expected = Date.new(2024, 7, 8).strftime(@family.date_format)
+ assert_match expected, response.body
+ end
+
test "show renders the first group at position 0" do
2.times { create_transaction(account: @account, name: "Netflix") }
3.times { create_transaction(account: @account, name: "Starbucks") }