aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311/GetServiceRequestUpdates.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-08-03 17:46:06 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-08-06 13:34:31 +0100
commita292b3a8bcca53f870a46d6868d288e22a595c58 (patch)
treed88c27552ee27367516f7497d48807c11ee31b31 /perllib/Open311/GetServiceRequestUpdates.pm
parent7e2463f04c67091423dcfb3eec3536d4791103e1 (diff)
[Open311] No update text on fixed state move.
A move between fixed states (presumably from fixed-user to fixed-council) should not count as a state change for the purposes of generating comment text from templates.
Diffstat (limited to 'perllib/Open311/GetServiceRequestUpdates.pm')
-rw-r--r--perllib/Open311/GetServiceRequestUpdates.pm6
1 files changed, 4 insertions, 2 deletions
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 = {