aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md2
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm6
-rw-r--r--t/open311/getservicerequestupdates.t20
-rw-r--r--templates/web/base/alert/index.html2
-rw-r--r--web/cobrands/bathnes/assets.js2
-rw-r--r--web/cobrands/bristol/assets.js6
-rw-r--r--web/cobrands/bromley/assets.js2
-rw-r--r--web/cobrands/buckinghamshire/assets.js2
-rw-r--r--web/cobrands/fixmystreet/assets.js7
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js4
-rw-r--r--web/js/map-OpenLayers.js4
11 files changed, 49 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b26064f0a..1a9232adc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,8 +29,10 @@
- Hide password help field along with other similar. #2185
- Allow questionnaire link to be revisited in quick succession. #2123
- Update Google Maps directions link.
+ - Fix inspector pin dragging. #2073.
- Open311 improvements:
- CLOSED status maps to 'closed' state if extended statuses are enabled.
+ - Don't generate template comment text on move between fixed states.
- Development improvements:
- Cobrand hook for presenting custom search results. #2183
- Cobrand hook to allow extra login conditions #2092
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm
index 4b1642506..480a78cf1 100644
--- a/perllib/Open311/GetServiceRequestUpdates.pm
+++ b/perllib/Open311/GetServiceRequestUpdates.pm
@@ -201,8 +201,10 @@ sub comment_text_for_request {
return $request->{description} if $request->{description};
- # Response templates are only triggered if the state/external status has changed
- my $state_changed = $state ne $old_state;
+ # Response templates are only triggered if the state/external status has changed.
+ # And treat any fixed state as fixed.
+ my $state_changed = $state ne $old_state
+ && !( $problem->is_fixed && FixMyStreet::DB::Result::Problem->fixed_states()->{$state} );
my $ext_code_changed = $ext_code ne $old_ext_code;
if ($state_changed || $ext_code_changed) {
my $state_params = {
diff --git a/t/open311/getservicerequestupdates.t b/t/open311/getservicerequestupdates.t
index 27064574b..9383b8476 100644
--- a/t/open311/getservicerequestupdates.t
+++ b/t/open311/getservicerequestupdates.t
@@ -32,6 +32,12 @@ my $response_template = $bodies{2482}->response_templates->create({
auto_response => 1,
state => "investigating"
});
+my $response_template_fixed = $bodies{2482}->response_templates->create({
+ title => "fixed template",
+ text => "We have fixed this report.",
+ auto_response => 1,
+ state => "fixed - council"
+});
my $requests_xml = qq{<?xml version="1.0" encoding="utf-8"?>
<service_requests_updates>
@@ -370,6 +376,19 @@ for my $test (
end_state => 'investigating',
},
{
+ desc => 'change in fixed state does not trigger auto-response template',
+ description => '',
+ xml_description => '',
+ external_id => 638344,
+ start_state => 'fixed - user',
+ comment_status => 'FIXED',
+ mark_fixed => 0,
+ mark_open => 0,
+ problem_state => undef,
+ end_state => 'fixed - user',
+ comment_state => 'hidden',
+ },
+ {
desc => 'unchanging state does not trigger auto-response template',
description => '',
xml_description => '',
@@ -898,6 +917,7 @@ foreach my $test ( {
}
}
+$response_template_fixed->delete;
foreach my $test ( {
desc => 'normally blank text produces a warning',
num_alerts => 1,
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index ca1b26e60..fa6e01fad 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -33,7 +33,7 @@ within a certain distance of a particular location.', "%s is the site name"), si
<label for="pc">[% loc('Postcode or street name and area') %]</label>
<p class="form-hint" id="pc-hint">[% tprintf(loc('e.g. ā€˜%s’ or ā€˜%s’'), c.cobrand.example_places) %]</p>
<div class="form-txt-submit-box">
- <input class="form-control" type="text" name="pc" value="[% pc | html %]" aria-describedby="pc-hint">
+ <input class="form-control" type="text" id="pc" name="pc" value="[% pc | html %]" aria-describedby="pc-hint">
<input class="green-btn" type="submit" value="[% loc('Go') %]">
</div>
</fieldset>
diff --git a/web/cobrands/bathnes/assets.js b/web/cobrands/bathnes/assets.js
index e455d78e9..16ecb3076 100644
--- a/web/cobrands/bathnes/assets.js
+++ b/web/cobrands/bathnes/assets.js
@@ -23,7 +23,7 @@ fixmystreet.maps.banes_defaults = {
asset_category: "",
asset_item: "asset",
asset_type: 'spot',
- max_resolution: 2.388657133579254,
+ max_resolution: 4.777314267158508,
min_resolution: 0.5971642833948135,
asset_id_field: 'feature_no',
attributes: null,
diff --git a/web/cobrands/bristol/assets.js b/web/cobrands/bristol/assets.js
index 6d2020bfe..1b32379dc 100644
--- a/web/cobrands/bristol/assets.js
+++ b/web/cobrands/bristol/assets.js
@@ -7,7 +7,10 @@ if (!fixmystreet.maps) {
var options = {
wfs_url: "https://maps.bristol.gov.uk/arcgis/services/ext/FixMyStreetSupportData/MapServer/WFSServer",
wfs_feature: "COD_ASSETS_POINT",
- max_resolution: 0.33072982812632296,
+ max_resolution: {
+ 'bristol': 0.33072982812632296,
+ 'fixmystreet': 4.777314267158508
+ },
min_resolution: 0.00001,
asset_id_field: 'COD_ASSET_ID',
asset_type: 'spot',
@@ -17,6 +20,7 @@ var options = {
usrn: 'COD_USRN'
},
body: "Bristol City Council",
+ srsName: "EPSG:27700",
geometryName: 'SHAPE'
};
diff --git a/web/cobrands/bromley/assets.js b/web/cobrands/bromley/assets.js
index 959148e5d..32c00d32d 100644
--- a/web/cobrands/bromley/assets.js
+++ b/web/cobrands/bromley/assets.js
@@ -16,7 +16,7 @@ var defaults = {
},
format_class: OpenLayers.Format.GML.v3.MultiCurveFix,
asset_type: 'spot',
- max_resolution: 2.388657133579254,
+ max_resolution: 4.777314267158508,
min_resolution: 0.5971642833948135,
asset_id_field: 'CENTRAL_AS',
geometryName: 'msGeometry',
diff --git a/web/cobrands/buckinghamshire/assets.js b/web/cobrands/buckinghamshire/assets.js
index 3f22774fc..57b2317a4 100644
--- a/web/cobrands/buckinghamshire/assets.js
+++ b/web/cobrands/buckinghamshire/assets.js
@@ -16,7 +16,7 @@ var defaults = {
},
format_class: OpenLayers.Format.GML.v3.MultiCurveFix,
asset_type: 'spot',
- max_resolution: 2.388657133579254,
+ max_resolution: 4.777314267158508,
min_resolution: 0.5971642833948135,
asset_id_field: 'central_as',
attributes: {
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index f53d26bbb..31dcaec07 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -491,12 +491,17 @@ fixmystreet.assets = {
options.asset_category = [ options.asset_category ];
}
+ var max_resolution = options.max_resolution;
+ if (typeof max_resolution === 'object') {
+ max_resolution = max_resolution[fixmystreet.cobrand];
+ }
+
var layer_options = {
fixmystreet: options,
strategies: [new StrategyClass()],
protocol: protocol,
visibility: false,
- maxResolution: options.max_resolution,
+ maxResolution: max_resolution,
minResolution: options.min_resolution,
styleMap: options.stylemap || get_asset_stylemap(),
assets: true
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 1b863625f..7d7a51d4a 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -1168,6 +1168,10 @@ fixmystreet.display = {
fixmystreet.maps.click_control.activate();
}
+ if (fixmystreet.maps.setup_inspector) {
+ fixmystreet.maps.setup_inspector();
+ }
+
if (typeof callback === 'function') {
callback();
}
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index b2b74648c..d95103f82 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -178,6 +178,10 @@ $.extend(fixmystreet.utils, {
return lonlat;
},
+ setup_inspector: function() {
+ setup_inspector_marker_drag();
+ },
+
markers_list: function(pins, transform) {
var markers = [];
var size = fixmystreet.maps.marker_size();