Skip to content

Commit

Permalink
Merge branch 'surrey-boomi' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Jul 4, 2024
2 parents 1ff1622 + 1283631 commit 7d31bd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion perllib/Open311/Endpoint/Integration/Boomi.pm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ sub post_service_request {
longitude => $args->{long},
easting => $args->{attributes}->{easting},
northing => $args->{attributes}->{northing},
usrn => $args->{attributes}->{USRN},
streetName => $args->{attributes}->{ROADNAME},
},
requester => {
fullName => $args->{first_name} . " " . $args->{last_name},
Expand All @@ -96,7 +98,7 @@ sub post_service_request {
},
};

foreach (qw/group category easting northing title description phone/) {
foreach (qw/group category easting northing title description phone USRN ROADNAME/) {
if (defined $args->{attributes}->{$_}) {
delete $args->{attributes}->{$_};
}
Expand Down
6 changes: 5 additions & 1 deletion t/open311/endpoint/surrey_boomi.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ $lwp->mock(request => sub {
"longitude" => "0.1",
"northing" => "2",
"latitude" => "50",
"easting" => "1"
"easting" => "1",
"usrn" => "31200342",
"streetName" => "Cockshot Hill",
},
"subject" => "Pot hole on road",
"description" => "Big hole in the road",
Expand Down Expand Up @@ -204,6 +206,8 @@ subtest "POST report" => sub {
'attribute[group]' => 'Roads',
'attribute[fixmystreet_id]' => 1,
'attribute[RM1]' => "RM1B",
'attribute[USRN]' => "31200342",
'attribute[ROADNAME]' => "Cockshot Hill",
);
is $res->code, 200;
is_deeply decode_json($res->content), [{
Expand Down

0 comments on commit 7d31bd6

Please sign in to comment.