aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-06-23 17:07:10 +0100
committerStruan Donald <struan@exo.org.uk>2011-06-23 17:07:10 +0100
commit7d097bb489deea35ef4fda6002a0d6936bf6b649 (patch)
tree4394c10951d99bd7203c0a30aed520b0f18c5083 /perllib/FixMyStreet/DB/Result/Comment.pm
parentfb56c38856fe33c971903ab0efde1cf5d4829426 (diff)
indicate changes state in update meta information
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 81aa18b95..76c96e581 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -146,6 +146,22 @@ sub get_photo_params {
return $photo;
}
+=head2 meta_problem_state
+
+Returns a string suitable for display in the update meta section.
+Mostly removes the '- council/user' bit from fixed states
+
+=cut
+
+sub meta_problem_state {
+ my $self = shift;
+
+ my $state = $self->problem_state;
+ $state =~ s/ -.*$//;
+
+ return $state;
+}
+
# we need the inline_constructor bit as we don't inherit from Moose
__PACKAGE__->meta->make_immutable( inline_constructor => 0 );