diff options
author | Chris Mytton <chrism@mysociety.org> | 2020-05-04 15:58:47 +0100 |
---|---|---|
committer | Chris Mytton <chrism@mysociety.org> | 2020-05-06 08:54:54 +0100 |
commit | cc2b8f54ceca90b0f4ab8626d7798052334b7e47 (patch) | |
tree | 777d78e1d80d51225f1375f8e793a7a6a82bfc98 /perllib/FixMyStreet/Script | |
parent | 819abc9849bae380f64ae2adc3657c27b34a6654 (diff) |
[BANES] Add script to close redundant reports
B&NES have sent us a spreadsheet with a list of reports along with their
IDs that they want marking as "No further action" along with a specific
update.
This script takes a comma-separated list of report IDs and closes those
reports, leaving the appropriate comment text.
Diffstat (limited to 'perllib/FixMyStreet/Script')
-rw-r--r-- | perllib/FixMyStreet/Script/ArchiveOldEnquiries.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/Script/ArchiveOldEnquiries.pm b/perllib/FixMyStreet/Script/ArchiveOldEnquiries.pm index 0c938682d..c0aa89e0d 100644 --- a/perllib/FixMyStreet/Script/ArchiveOldEnquiries.pm +++ b/perllib/FixMyStreet/Script/ArchiveOldEnquiries.pm @@ -11,6 +11,7 @@ use FixMyStreet::Email; my $opts = { commit => 0, + close_state => 'closed', }; sub query { @@ -161,10 +162,10 @@ sub close_problems { mark_fixed => 0, anonymous => 0, state => 'confirmed', - problem_state => 'closed', + problem_state => $opts->{closed_state}, extra => $extra, } ); - $problem->update({ state => 'closed', send_questionnaire => 0 }); + $problem->update({ state => $opts->{closed_state}, send_questionnaire => 0 }); next if $opts->{retain_alerts}; |