aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-15 16:53:28 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-15 16:53:28 +0100
commit7b2fb6cd9934fae59d89cfeabf5260a54713c26f (patch)
treea1cc6474a0f72175e333ca89cfa13c77b24c9695 /perllib/FixMyStreet
parent33074d2d554990621d6941f9c7bf02b7a8ffb18a (diff)
update report display to handle new statuses
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 366024c7c..3e82e3784 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -284,6 +284,21 @@ sub get_photo_params {
return $photo;
}
+sub is_open {
+ my $self = shift;
+
+ my %open_states = (
+ unconfirmed => 1,
+ partial => 1,
+ confirmed => 1,
+ 'planned' => 1,
+ 'investigating' => 1,
+ 'in progress' => 1,
+ );
+
+ return exists $open_states{ $self->state } ? 1 : 0;
+}
+
=head2 meta_line
Returns a string to be used on a problem report page, describing some of the