diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-11-15 11:15:31 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2019-12-09 12:50:07 +0000 |
commit | eb2b9ee4d5aa28e400910633b6bc888d20fc386b (patch) | |
tree | 1099cb68b768559f970ee80b63491ccd2379c783 | |
parent | 94abae58522ee2b1f2f881b8c93edfc8acafcd85 (diff) |
[TfL] Remove action scheduled and for triage states.
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 11 | ||||
-rw-r--r-- | t/cobrand/tfl.t | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index cab1e3ada..6bc6f9be5 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -108,6 +108,17 @@ sub admin_allow_user { return $user->from_body->name eq 'TfL'; } +sub state_groups_inspect { + my $rs = FixMyStreet::DB->resultset("State"); + my @open = grep { $_ !~ /^(planned|action scheduled|for triage)$/ } FixMyStreet::DB::Result::Problem->open_states; + my @closed = grep { $_ ne 'closed' } FixMyStreet::DB::Result::Problem->closed_states; + [ + [ $rs->display('confirmed'), \@open ], + [ $rs->display('fixed'), [ 'fixed - council' ] ], + [ $rs->display('closed'), \@closed ], + ] +} + sub fetch_area_children { my $self = shift; diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index abfb924ff..48bc6e46e 100644 --- a/t/cobrand/tfl.t +++ b/t/cobrand/tfl.t @@ -247,6 +247,14 @@ subtest 'Dashboard CSV extra columns' => sub { $mech->content_contains(',,,yes,busstops@example.com,,' . $dt . ',"Council User"'); }; +subtest 'Inspect form state choices' => sub { + my $report = FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report 1'}); + my $id = $report->id; + $mech->get_ok("/report/$id"); + $mech->content_lacks('for triage'); + $mech->content_lacks('action scheduled'); +}; + subtest "change category, report resent to new location" => sub { my $report = FixMyStreet::DB->resultset("Problem")->find({ title => 'Test Report 1'}); my $id = $report->id; |