aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-06-20 16:38:34 +0100
committerDave Arter <davea@mysociety.org>2018-06-21 11:17:45 +0100
commit1e48a4a25d718fa1ffb754cc682eae4e4f9c1bf1 (patch)
treea087892d2071d846cb97fc3e03d830e175fce55e /perllib/Open311
parente1853898c154356bf0af7ef021f9b1c519e8340b (diff)
Map Open311 CLOSED status to closed state if extended statuses enabled.
The Open311 specification has two values for a report's status: - open: it has been reported. - closed: it has been resolved. FixMyStreet previously mapped 'closed' to 'fixed - council', but this has been causing issues with Open311 endpoints that want to mark a FMS report as closed but not fixed. The mySociety Open311 additions introduce extended statuses, some of which represent a 'closed' state e.g. duplicate, no_further_action, but there are times when a report should simply be closed without any indication why - for example, if open311-adapter is being used to integrate with a council system which has a closed state not represented by the extended statuses. Marking a report as 'closed' on a council system and displaying that as 'fixed' on the FixMyStreet front end is not an ideal situation. This commit changes the mapping of the Open311 'closed' status to the 'closed' FMS state when extended_statuses is enabled.
Diffstat (limited to 'perllib/Open311')
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index 7cbfc7192..4b1642506 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -32,9 +32,10 @@ sub fetch {
while ( my $body = $bodies->next ) {
my $o = Open311->new(
- endpoint => $body->endpoint,
- api_key => $body->api_key,
- jurisdiction => $body->jurisdiction,
+ endpoint => $body->endpoint,
+ api_key => $body->api_key,
+ jurisdiction => $body->jurisdiction,
+ extended_statuses => $body->send_extended_statuses,
);
# custom endpoint URLs because these councils have non-standard paths