*Record what you sent*: one-off letters and superseded files are offered, though the help texts and wiki say not #510
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#510
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, following the reusable template flag and the supersedes link from the forms that set them to the form that reads them.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atdocuments/models.py:418-422(is_templateand its help text);documents/forms.pyand the letter list's template have not moved.Two promises made where a person sets something up are not kept where it is used. A letter's reusable template box says templates are what is offered when sending, and the wiki says to untick it for a one-off letter; an upload's supersedes field says the older version is "kept but no longer offered".
SendDocumentsFormfilters on neither, so every letter and every version of every file is offered.documents/forms.py:320-326,SendDocumentsForm.__init__, which setsCoverLetter.objects.for_user(user)andUploadedDocument.objects.for_user(user)with no further filter; the promises are atdocuments/models.py:378-382(is_template, help text "Templates appear when you send a letter with an application."),documents/forms.py:247(replaces, "An older version of the same thing, kept but no longer offered.") and the wiki's Cover letters page, section Templates ("Letters marked reusable template are offered when you record what you sent with an application. Untick it for a one-off letter written for a single employer.").src,testsandtemplates,is_templateis read only by the letter list's badge (templates/documents/letter_list.html:46), the API, the export, the admin and the demo seed; nothing narrows a choice by it, and nothing narrows uploads byreplaced_by.SendDocumentsForm.__init__, narrowcover_lettertois_template=Trueanduploadstoreplaced_by__isnull=True. Recording something sent in the past with an old version must stay possible, so either keep a bound value that falls outside the filter (re-rendering a form with errors must not drop it) or offer the older items under a "show all" choice. If the maintainer prefers to keep everything selectable, change the two help texts and the wiki instead, so they describe what the flag and the supersedes link actually do.Done when
tests/test_documents.pyassert that the Record what you sent form offers neither a letter withis_template=Falsenor an upload that another uploadreplaces(or, if the texts are changed instead, that the help texts no longer promise it).