diff options
author | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
commit | 987124b09a32248414faf4d0d6615d43b29ac6f6 (patch) | |
tree | a549db8af723c981d3b346e855f25d6fd5ff8aa7 /bin/oxfordshire/archive-old-enquiries | |
parent | dbf56159e44c1560a413022451bf1a1c4cb22a52 (diff) | |
parent | a085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff) |
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'bin/oxfordshire/archive-old-enquiries')
-rwxr-xr-x | bin/oxfordshire/archive-old-enquiries | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/oxfordshire/archive-old-enquiries b/bin/oxfordshire/archive-old-enquiries new file mode 100755 index 000000000..7fe66703a --- /dev/null +++ b/bin/oxfordshire/archive-old-enquiries @@ -0,0 +1,29 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +require 5.8.0; + +BEGIN { + use File::Basename qw(dirname); + use File::Spec; + my $d = dirname(File::Spec->rel2abs($0)); + require "$d/../../setenv.pl"; +} + +use FixMyStreet::Script::ArchiveOldEnquiries; +use Getopt::Long::Descriptive; + +my ($opts, $usage) = describe_options( + '%c %o', + ['commit|c', "actually close reports and send emails. Omitting this flag will do a dry-run"], + ['body|b=s', "which body ID to close reports for"], + ['cobrand=s', "which cobrand template to use for sent emails"], + ['closure-cutoff=s', "Anything before this will be closed with no email"], + ['email-cutoff=s', "Anything before this will be closed with an email sent to the reporter"], + ['limit|l=s', "limit to a certain number of reports/users to be closed"], + ['help|h', "print usage message and exit" ], +); +print($usage->text), exit if $opts->help; + +FixMyStreet::Script::ArchiveOldEnquiries::archive($opts); |