fix(transactions): show full dates in the categorize wizard (#2633)

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.
This commit is contained in:
Stephen Jolly
2026-07-17 06:19:57 +01:00
committed by GitHub
parent fda33cb0df
commit c9ca83a0d4
2 changed files with 14 additions and 1 deletions

View File

@@ -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") }