Skip to content

Commit

Permalink
Merge branch 'issues/freshdesk/4195-bexley-new-status' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed May 23, 2024
2 parents af8e3d1 + d71d44c commit 36839d1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 61 deletions.
57 changes: 0 additions & 57 deletions bin/whitespace/bexley-service-mapping

This file was deleted.

14 changes: 13 additions & 1 deletion conf/council-bexley_whitespace.yml-example
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ category_mapping:
name: Report missed collection
group: Waste

service_mapping: # Replace with output from `bin/whitespace/bexley-service-mapping`
service_mapping: # Copy from staging/live config
FO-23:
service_item_id: 33 # Food 23 ltr Caddy
service_id: 285 # Missed Collection Food
FO-140:
service_item_id: 32 # Food 140 ltr Bin
service_id: 285 # Missed Collection Food
GA-140:
service_item_id: 50 # Garden 140 ltr Bin
service_id: 286 # Missed Collection Garden
GA-240:
service_item_id: 52 # Garden 240 ltr Bin
service_id: 286 # Missed Collection Garden
2 changes: 1 addition & 1 deletion perllib/Open311/Endpoint/Integration/Ezytreev.pm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ sub post_service_request {
CRMXRef => $crm_xref,
EnquiryDescription => $args->{description},
Forename => $args->{first_name},
Surname => $args->{last_name},
Surname => substr($args->{last_name}, 0, 20),
Category => "T", # Always T, the actual category goes into EnquiryType below
EnquiryType => $args->{service_code},
TelHome => $args->{phone},
Expand Down
3 changes: 3 additions & 0 deletions perllib/Open311/Endpoint/Integration/UK/Bexley/Symology.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ sub _update_status {
'investigating'
} elsif ($action_due =~ /^PT[CS]|TPHR|REIN$/) {
'action_scheduled'
} elsif ($action_due eq 'ROD') {
'closed'
} elsif ($row->{Stage} == 9 || $row->{Stage} == 8) {
undef
} else {
Expand All @@ -91,6 +93,7 @@ sub _update_status {
if ($status && ( $status eq 'not_councils_responsibility'
|| $status eq 'action_scheduled'
|| $status eq 'no_further_action'
|| $status eq 'closed'
|| $status eq 'internal_referral' )) {
$row->{'Event Type'};
} else {
Expand Down
14 changes: 12 additions & 2 deletions t/open311/endpoint/bexley_symology.t
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ $bexley_end->mock(_get_update_files => sub {
17/04/2019 13:53,04/04/2019,560058,RECORDED,,SI6,SI6MOB,IR,RES,1
17/04/2019 14:06,04/04/2019,560062,RECORDED,,SI5,NCR,N1,,1
17/04/2019 14:07,04/04/2019,560062,RECORDED,,SI5,NCR,RPOS,,1
17/04/2019 14:08,04/04/2019,560062,RECORDED,,SI5,NCR,CR,,1
17/04/2019 14:08,04/04/2019,560062,RECORDED,,SI5,NCR,ROD,FOO,1
17/04/2019 14:09,04/04/2019,560062,RECORDED,,SI5,NCR,CR,,1
EOF
\<<EOF,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Expand Down Expand Up @@ -613,9 +614,18 @@ subtest "GET updates OK" => sub {
"media_url" => "",
},
{
"update_id" => "560062_94e427db",
"update_id" => "560062_6181418a",
"updated_datetime" => "2019-04-17T14:08:00+01:00",
"service_request_id" => "560062",
"status" => "closed",
"description" => "",
"media_url" => "",
"external_status_code" => 'FOO',
},
{
"update_id" => "560062_2e55f431",
"updated_datetime" => "2019-04-17T14:09:00+01:00",
"service_request_id" => "560062",
"status" => "fixed",
"description" => "",
"media_url" => "",
Expand Down

0 comments on commit 36839d1

Please sign in to comment.