aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/zurich/fixture9
-rwxr-xr-xbin/zurich/overdue-alert4
2 files changed, 8 insertions, 5 deletions
diff --git a/bin/zurich/fixture b/bin/zurich/fixture
index fec9977a5..e387c4fab 100755
--- a/bin/zurich/fixture
+++ b/bin/zurich/fixture
@@ -17,6 +17,7 @@ BEGIN {
}
use FixMyStreet;
+use FixMyStreet::Cobrand::Zurich;
use FixMyStreet::DB::Factories;
use Getopt::Long::Descriptive;
@@ -30,6 +31,9 @@ print($usage->text), exit if $opt->help;
FixMyStreet::DB::Factories->setup($opt);
+my $cobrand = FixMyStreet::Cobrand::Zurich->new();
+$cobrand->db_state_migration;
+
# Body + categories
my $body = FixMyStreet::DB::Factory::Body->find_or_create({
name => 'Zürich',
@@ -93,11 +97,10 @@ foreach (
my $lat = 47.381416;
my $lon = 8.531369;
-my $cobrand = 'zurich';
my $user = $users{'user@example.org'};
my $num = 20;
-say "Created $num problems around '$lat,$lon' in cobrand '$cobrand'";
+say "Created $num problems around '$lat,$lon' in cobrand '" . $cobrand->moniker . "'";
my $confirmed = DateTime->today->subtract(days => 1)->add(hours => 8);
my $problems = [];
for (1..$num) {
@@ -110,7 +113,7 @@ for (1..$num) {
latitude => $lat,
longitude => $lon,
category => $category,
- cobrand => $cobrand,
+ cobrand => $cobrand->moniker,
confirmed => $confirmed,
});
}
diff --git a/bin/zurich/overdue-alert b/bin/zurich/overdue-alert
index f4fd0f4b7..7689c172f 100755
--- a/bin/zurich/overdue-alert
+++ b/bin/zurich/overdue-alert
@@ -32,9 +32,9 @@ exit if FixMyStreet::Cobrand::Zurich::is_public_holiday($now) or FixMyStreet::Co
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('zurich')->new();
my %bodies = map { $_->id => $_ } FixMyStreet::DB->resultset("Body")->all;
-loop_through( 'alert-moderation-overdue.txt', 0, 1, [ 'unconfirmed' ] );
+loop_through( 'alert-moderation-overdue.txt', 0, 1, [ 'submitted' ] );
loop_through( 'alert-overdue.txt', 1, 6, 'in progress' );
-loop_through( 'alert-overdue.txt', 0, 6, ['confirmed', 'planned'] );
+loop_through( 'alert-overdue.txt', 0, 6, ['confirmed', 'feedback pending'] );
sub loop_through {
my ( $template, $include_parent, $days, $states ) = @_;