diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-23 17:07:10 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-06-23 17:07:10 +0100 |
commit | 7d097bb489deea35ef4fda6002a0d6936bf6b649 (patch) | |
tree | 4394c10951d99bd7203c0a30aed520b0f18c5083 /perllib/FixMyStreet/DB/Result/Comment.pm | |
parent | fb56c38856fe33c971903ab0efde1cf5d4829426 (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.pm | 16 |
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 ); |