diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-21 09:39:01 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-21 09:39:01 +0000 |
commit | 03ae1d02091262b19d87ba47cd0ea5db0404df16 (patch) | |
tree | e1f834db1effd68b87fb84e1e862fe6bc5d2067b /perllib/FixMyStreet/DB/Result/Questionnaire.pm | |
parent | eb46ce3f4155fdd9333432ecc6ad773dae79dc91 (diff) | |
parent | 5724c6adf8db7cca611fcc000e6fa4e995fcc2bd (diff) |
Merge branch '2357-show-more-questionnaire-updates'
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Questionnaire.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Questionnaire.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Questionnaire.pm b/perllib/FixMyStreet/DB/Result/Questionnaire.pm index 30f2ab7ce..6b7ab9452 100644 --- a/perllib/FixMyStreet/DB/Result/Questionnaire.pm +++ b/perllib/FixMyStreet/DB/Result/Questionnaire.pm @@ -57,4 +57,11 @@ my $stz = sub { around whensent => $stz; around whenanswered => $stz; +sub marks_fixed { + my $self = shift; + my $new_fixed = FixMyStreet::DB::Result::Problem->fixed_states()->{$self->new_state}; + my $old_fixed = FixMyStreet::DB::Result::Problem->fixed_states()->{$self->old_state}; + return $new_fixed && !$old_fixed; +} + 1; |