blob: 7a231b9195d04ff2d03358c249cefde55cdb6677 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/env perl
=head1 DESCRIPTION
Ad hoc script to update the send_questionnaire column on the
reports in cobrands that don't send questionnaires at all.
=cut
use strict;
use warnings;
use FixMyStreet::App;
my @cobrands;
foreach my $cobrand ( FixMyStreet::Cobrand->available_cobrand_classes() ) {
next unless $cobrand->{class};
my $cls = $cobrand->{class}->new();
push @cobrands, $cls->moniker if !$cls->send_questionnaires();
}
my $problems = FixMyStreet::App->model('DB::Problem')->search({
cobrand => \@cobrands,
send_questionnaire => 1,
});
$problems->update( {
send_questionnaire => 0
});
|