diff --git a/app/models/commissioning_document_template/standard.rb b/app/models/commissioning_document_template/standard.rb index ce9b752534..e2fce38075 100644 --- a/app/models/commissioning_document_template/standard.rb +++ b/app/models/commissioning_document_template/standard.rb @@ -44,7 +44,10 @@ def request_additional_info def context super.merge( addressee_location: data_request_area.location, + aliases: kase.subject_aliases, + crn: kase.case_reference_number, deadline:, + pnc: kase.other_subject_ids, request_info:, requests:, request_additional_info:, diff --git a/lib/assets/standard.docx b/lib/assets/standard.docx index 992c60e8bb..0faee05452 100644 Binary files a/lib/assets/standard.docx and b/lib/assets/standard.docx differ diff --git a/spec/models/commissioning_document_template/standard_spec.rb b/spec/models/commissioning_document_template/standard_spec.rb index b8010bcb79..44c9c6b941 100644 --- a/spec/models/commissioning_document_template/standard_spec.rb +++ b/spec/models/commissioning_document_template/standard_spec.rb @@ -5,10 +5,13 @@ let(:kase) do build_stubbed(:offender_sar_case, + case_reference_number: "CRN999", number: "20062007", subject_full_name: "Robert Badson", date_of_birth: "2000-03-11", - prison_number: "AB12345") + prison_number: "AB12345", + subject_aliases: "Mr Blobby", + other_subject_ids: "XYZ98765") end let(:data_request) do @@ -36,10 +39,13 @@ let(:expected_context) do { addressee_location: "HMP halifax", + aliases: "Mr Blobby", + crn: "CRN999", dpa_reference: "20062007", offender_name: "Robert Badson", date_of_birth: "11/03/2000", date: "21/10/2022", + pnc: "XYZ98765", prison_numbers: "AB12345", deadline: "26/10/2022", request_info: [ @@ -74,10 +80,13 @@ let(:expected_context) do { addressee_location: "HMP halifax", + aliases: "Mr Blobby", + crn: "CRN999", dpa_reference: "20062007", offender_name: "Robert Badson", date_of_birth: "11/03/2000", date: "21/10/2022", + pnc: "XYZ98765", prison_numbers: "AB12345", deadline: "26/10/2022", request_info: [ @@ -114,10 +123,13 @@ let(:expected_context) do { addressee_location: "HMP halifax", + aliases: "Mr Blobby", + crn: "CRN999", dpa_reference: "20062007", offender_name: "Robert Badson", date_of_birth: "11/03/2000", date: "21/10/2022", + pnc: "XYZ98765", prison_numbers: "AB12345", deadline: "26/10/2022", request_info: [ @@ -283,8 +295,6 @@ it "returns the correct additional info for each request_type" do expected_info = "When providing the footage please supply an up-to-date photograph of the data subject and confirm the data you are sending us contains that same person. We cannot proceed without you verifying this.\nIf you have access to a Teams channel, please send the footage in MP4 format where possible.\n\nIf you have a transcript, please send this at the same time as the audio calls. If you do not have one we do not require you to create one.\n" - puts expected_info - puts template.request_additional_info expect(template.request_additional_info).to eq(expected_info) end end