Spreadsheet import: column guessing takes a partial match before an exact one, so \"Applied through\" becomes the date #465
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#465
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, readingguess_mappingand running it against a few header rows.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/csv_import.py:501-519(guess_mapping).guess_mappinggives each header the first field inSYNONYMSwhose words match it exactly or as a leading or trailing word, all in one pass.applied_atcomes early inSYNONYMSand holds the short words "applied" and "date", so a header that is an exact synonym of a later field, or merely ends in "date", is taken as the applied date first. The real date column that follows then findsapplied_atalready taken and is guessed as "ignore".core/csv_import.py:497-515,guess_mapping: the exact test (name in words) and the prefix/suffix test (name.startswith(word + " ") or name.endswith(" " + word)) sit in the same condition inside the loop overSYNONYMS, which is ordered... status, applied_at, deadline, ... channel ....Company, Role, Applied through, Date appliedis guessed ascompany, role, applied_at, ignore, although "applied through" is listed word for word among thechannelsynonyms;Company, Role, Deadline date, Date appliedandCompany, Role, Interview date, Date appliedgive the same result.With
Company,Role,Status,Applied through,Date appliedand the rowAcme,Dev,Interviewing,LinkedIn,2026-09-01,parse_rowsreturnsapplied_at=None, an empty channel and the note "Applied through: LinkedIn", and the row becomes an application with no date. The same columns in the other order (Date appliedbeforeApplied through) are guessed correctly.deadlinethrough "deadline", not toapplied_atthrough "date").Done when
tests/test_csv_import.pyasserts thatguess_mapping(["Company", "Role", "Applied through", "Date applied"])is["company", "role", "channel", "applied_at"], and thatguess_mapping(["Company", "Role", "Deadline date", "Date applied"])maps the third column todeadlineand the fourth toapplied_at.