From 9414254ce424f9c4fc86e80e45c47e2a08b890ce Mon Sep 17 00:00:00 2001 From: Jacob Penner Date: Thu, 19 Sep 2024 12:44:28 -0400 Subject: [PATCH] more naming tweaks --- .../simple_forms_api/s3/submission_archive_builder.rb | 5 +++-- .../app/services/simple_forms_api/s3/submission_archiver.rb | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_builder.rb b/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_builder.rb index fc969c46509..d1c1e94e8d8 100644 --- a/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_builder.rb +++ b/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archive_builder.rb @@ -118,9 +118,10 @@ def form_data_hash # Name the form PDFs and/or individual submission folders # uniquely, using a field that also appears in the manifest. - # The recommended format is Formnumber-vagov-submission ID + # The recommended format is Form-number-vagov-submission ID def submission_pdf_filename - @submission_pdf_filename ||= "#{form_data_hash['form_number']}-vagov-#{benefits_intake_uuid}.pdf" + form_number = form_data_hash['form_number'] + @submission_pdf_filename ||= "form_#{form_number}_vagov_#{benefits_intake_uuid}.pdf" end end end diff --git a/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archiver.rb b/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archiver.rb index cd54675c775..cd5471db69f 100644 --- a/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archiver.rb +++ b/modules/simple_forms_api/app/services/simple_forms_api/s3/submission_archiver.rb @@ -117,8 +117,8 @@ def s3_submission_file_path end def unique_file_name - form_number = @JSON.parse(submission.form_data)['form_number'] - @unique_file_name ||= "form_#{form_number}_#{benefits_intake_uuid}" + form_number = JSON.parse(submission.form_data)['form_number'] + @unique_file_name ||= "form_#{form_number}_vagov_#{benefits_intake_uuid}" end def submission_pdf_filename