Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDPT-2377, CDPT-2378 Add alias and PNC to Standard commissioning document #2532

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/commissioning_document_template/standard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:,
Expand Down
Binary file modified lib/assets/standard.docx
Binary file not shown.
16 changes: 13 additions & 3 deletions spec/models/commissioning_document_template/standard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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
Expand Down
Loading