aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2020-03-10 17:58:48 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-07-13 10:18:48 +0100
commit6380aaa7f0294895578fa021c81f61905e4c213e (patch)
treea9d82c5eb2ebe1e4d7244f7b355519d8150276c1 /perllib/FixMyStreet/DB/Result/Comment.pm
parent71f4787dce0dec5c2f7157f106a5b539c24c6071 (diff)
[Northamptonshire] handle further investigation state
If an update has an external_status code of further we display 'Under futher investigation' on the site. This is for acknowledging comments from users.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index b217bf96c..68e267d00 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -265,16 +265,18 @@ sub meta_line {
};
sub problem_state_processed {
- my $self = shift;
+ my ( $self, $c ) = @_;
return 'fixed - user' if $self->mark_fixed;
return 'confirmed' if $self->mark_open;
- return $self->problem_state;
+ my $cobrand_state = $c->cobrand->call_hook(problem_state_processed => $self);
+
+ return $cobrand_state || $self->problem_state;
}
sub problem_state_display {
my ( $self, $c ) = @_;
- my $state = $self->problem_state_processed;
+ my $state = $self->problem_state_processed($c);
return '' unless $state;
my $cobrand_name = $c->cobrand->moniker;
@@ -323,7 +325,7 @@ sub as_hashref {
created => $self->created,
};
- $out->{problem_state} = $self->problem_state_processed;
+ $out->{problem_state} = $self->problem_state_processed($c);
$out->{photos} = [ map { $_->{url} } @{$self->photos} ] if !$cols || $cols->{photos};