Repository navigation
Conversation
rparke
force-pushed
the
rp-populate-sent-files-table-when-sending-emails-with-files
branch
4 times, most recently
from
October 28, 2026 09:28
6d6141b to
39f1a58
Compare
to make this as generic as possible we should only care about the placeholder name. Filenames are "optional" when sending via the API, but are set automatically when sent via admin. We should record both cases and therefore use the templates placeholder to identify the file instead of filename.
rparke
force-pushed
the
rp-populate-sent-files-table-when-sending-emails-with-files
branch
2 times, most recently
from
October 29, 2026 10:20
954cb98 to
9bde163
Compare
rparke
marked this pull request as ready for review
October 29, 2026 10:21
adds a record to the `sent_files` table, to be updated with the file id we get back from document download as `document_id` and allows us to query file ids for easy deletion if needed.
…s sent via either the api, one-off, or jobs flows. when sending via the api we need to handle files uploaded via the API and those that are already "attached" to a template. We heavily mock out calls to `persist_notification` in our one_off tests and it's a bit tricky to test that the table is actually updated. However we test that `persist_notification` is called with the correct args and we separately test taht `persist_notification` adds the record to the table.
rparke
force-pushed
the
rp-populate-sent-files-table-when-sending-emails-with-files
branch
from
October 29, 2026 13:40
4d32e58 to
1916159
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We should probably merge this first so that the colum rename happens before we actually start populating the table #5035.