From 95e0f8a2dd8c920748afddf760ee195bf99973e7 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 6 Nov 2024 14:56:05 +0000 Subject: [PATCH] fixup! [Bexley][WW] Implement worksheet sending for delivery requests --- perllib/Open311/Endpoint/Integration/Whitespace.pm | 2 +- perllib/Open311/Endpoint/Service/UKCouncil/Whitespace.pm | 2 +- t/open311/endpoint/whitespace.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perllib/Open311/Endpoint/Integration/Whitespace.pm b/perllib/Open311/Endpoint/Integration/Whitespace.pm index 13b77ac2..54db69ac 100644 --- a/perllib/Open311/Endpoint/Integration/Whitespace.pm +++ b/perllib/Open311/Endpoint/Integration/Whitespace.pm @@ -79,7 +79,7 @@ sub post_service_request { my $integration = $self->get_integration; $args->{attributes}{location_of_containers} //= ''; - $args->{attributes}{quantity} //= 1; + $args->{attributes}{quantity} ||= 1; my $worksheet_id = $integration->CreateWorksheet({ service_code => $args->{service_code}, diff --git a/perllib/Open311/Endpoint/Service/UKCouncil/Whitespace.pm b/perllib/Open311/Endpoint/Service/UKCouncil/Whitespace.pm index b2b9263a..3ebf1e5f 100644 --- a/perllib/Open311/Endpoint/Service/UKCouncil/Whitespace.pm +++ b/perllib/Open311/Endpoint/Service/UKCouncil/Whitespace.pm @@ -49,7 +49,7 @@ sub _build_attributes { Open311::Endpoint::Service::Attribute->new( code => 'quantity', description => 'Number of containers', - datatype => 'number', + datatype => 'string', required => 0, automated => 'hidden_field', ), diff --git a/t/open311/endpoint/whitespace.t b/t/open311/endpoint/whitespace.t index e9d5a6eb..4ddb2937 100644 --- a/t/open311/endpoint/whitespace.t +++ b/t/open311/endpoint/whitespace.t @@ -109,7 +109,7 @@ subtest "GET service" => sub { { code => 'fixmystreet_id', order => 3, required => 'true', variable => 'false', datatype => 'string', datatype_description => '', automated => 'server_set', description => 'external system ID' }, { code => 'assisted_yn', order => 4, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Assisted collection (Yes/No)' }, { code => 'location_of_containers', order => 5, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Location of containers' }, - { code => 'quantity', order => 6, required => 'false', variable => 'true', datatype => 'number', datatype_description => '', automated => 'hidden_field', description => 'Number of containers' }, + { code => 'quantity', order => 6, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Number of containers' }, ], }, 'correct json returned'; };