aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-03-03 17:58:31 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-03-10 16:53:14 +0000
commita91d9562c6c0ec836f10290df779e2012f18ddec (patch)
tree6e117020105d98bb6d3993af727eccc846c26cb9 /perllib/FixMyStreet/DB/Result/Problem.pm
parentc3c04c7dc01ed660c22c4bd43f308a01a47e7bcc (diff)
Add is_in_progress Problem helper.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index dcd5ecc71..0ab52628e 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -549,6 +549,16 @@ sub is_open {
return exists $self->open_states->{ $self->state } ? 1 : 0;
}
+=head2 is_in_progress
+
+Sees if the problem is in an open, not 'confirmed' state.
+
+=cut
+
+sub is_in_progress {
+ my $self = shift;
+ return $self->is_open && $self->state ne 'confirmed' ? 1 : 0;
+}
=head2 is_fixed