aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script
Commit message (Collapse)AuthorAgeLines
* Factor to common FixMyStreet::MapIt call.Matthew Somerville2019-04-04-4/+3
|
* Fix archive report script to not skip first row.Matthew Somerville2019-03-28-7/+8
| | | | | | | ->first, as used in cd8a5702, uses the iterator, so ->next will then only return the second onward. Instead, do the needed thing in the first iteration of the loop. Also check the option is set as some scripts do not set it.
* Merge branch 'issues/commercial/1273-ref-number-com'Matthew Somerville2019-03-27-1/+11
|\
| * [UK] Council reference in .com confirm sent email.Matthew Somerville2019-03-27-1/+11
| |
* | make sure the archive report script sets up lang etcStruan Donald2019-03-27-0/+8
|/ | | | | | Previously if no reports were closed with an email this meant that the lang setup never ran and you got an error when _ was called in close_problems. So, we call the lang setup in close_problems too.
* more obvious delineation between reports in error emailStruan Donald2019-03-25-1/+1
| | | | | It can be hard to see where one error stops and a new one begins in the send reports error emails so put in a more obvious break between them.
* [FixaMinGata] Adds a cobrand hook (threshold for responsiveness top 5 list)Joe Siltberg2019-02-25-1/+1
| | | | Fixes #1957
* [Buckinghamshire] Script to close old district flytipping reports.Matthew Somerville2019-01-23-18/+26
|
* Remove any use of `my $x if $foo`.Matthew Somerville2019-01-14-1/+3
| | | | | | | | As perlsyn says, "NOTE: The behaviour of a `my`, `state`, or `our` modified with a statement modifier conditional or loop construct (for example, `my $x if ...`) is undefined. The value of the `my` variable may be `undef`, any previously assigned value, or possibly anything else."
* Deal with possible multiple send_method_useds.Matthew Somerville2018-11-06-1/+8
|
* Don’t send questionnaires for closed reports.Dave Arter2018-10-26-1/+3
| | | | Fixes mysociety/fixmystreet-freshdesk#24.
* Add get_cobrand_logged to Comment.Matthew Somerville2018-10-09-2/+2
|
* Add hook for per-row questionnaire override.Matthew Somerville2018-09-13-1/+4
|
* pull out reports group_by code to methodStruan Donald2018-09-12-9/+16
| | | | So we can use this in collideoscope
* add end argument to loop_periodStruan Donald2018-09-12-5/+6
| | | | | So we can use it for collideoscope which does not use a fixed end period.
* Use do-not-reply address for sent report email.Matthew Somerville2018-07-09-1/+0
|
* [UK] Fix issue when body ID not equal to MapIt ID.Matthew Somerville2018-06-28-1/+4
| | | | | | | | | | | Hitherto when creating a body or ward alert on a UK site, the MapIt area ID has been stored instead of the body ID. This is okay for www.fixmystreet.com which for historical reasons does have body IDs that match MapIt area IDs, but other UK-based sites may well not. The alert lookup looks for body ID, meaning those alerts will not work. Save the body ID instead, plus fix some tests that were making the same assumption.
* Merge branch 'user-inactivity'Matthew Somerville2018-05-24-0/+174
|\
| * Add ability to close updates on reports.Matthew Somerville2018-05-23-0/+24
| | | | | | | | | | The inactive report script can mark matched reports as closed for updates. This removes the update form and signing up for updates from a report page.
| * Script to scrub old non-open reports.Matthew Somerville2018-05-23-0/+57
| |
| * Script to email/anonymize inactive users.Matthew Somerville2018-05-23-0/+93
| |
* | Use default sender for report sent email.Matthew Somerville2018-05-23-1/+1
|/
* Add a cobrand hook to table dashboard generation.Matthew Somerville2018-04-23-17/+25
| | | | This allows a cobrand to categorise the reports however it wishes.
* Don’t send alert emails when archiving old reportsDave Arter2018-04-12-1/+16
|
* Include cobrand in ‘report logged’ template paramsDave Arter2018-04-03-0/+1
| | | | | This was causing broken URLs in emails when sending reports to Bucks, as there was no cobrand to call `base_url_for_report` on.
* Store contributed-as data.Matthew Somerville2018-03-20-0/+3
| | | | | Store if the report/update was created by someone using the contributed-as dropdown, and use that information to perhaps not send report-sent emails.
* send multiple photos over open311Struan Donald2018-03-15-0/+2
| | | | | | | | Per cobrand configurable option to send multiple photos over open311 instead of just a single one. Does this by sending multiple media_url parameters in the POST body. The default remains to send the first photo associated with a report.
* Merge branch 'issues/commercial/987-zurich-csv-updates'Matthew Somerville2018-03-14-1/+1
|\
| * [Zurich] Switch to more modern database states.Matthew Somerville2018-03-07-1/+1
| | | | | | | | | | | | | | The Zurich code was written a long time ago, and used overriding so that e.g. the hard-coded 'investigating' state referred to Wunsch (wish). Now that states are stored in the database, we can create ones specially for Zurich and use them instead. Hooray!
* | [Warwickshire] Add archive script data.Matthew Somerville2018-03-14-11/+24
|/ | | | Add an update with each report closure.
* Use `report` more in email templates.Matthew Somerville2018-02-27-8/+0
|
* Improvements to report_sent_confirmation_email functionDave Arter2018-02-12-2/+2
| | | | | | - Send ‘report sent’ emails from cobrand’s contact address - Don’t send email when report is made using contribute-as-other and report_sent_confirmation_email is active.
* Allow ‘report as another user’ to only provide a phone numberDave Arter2018-02-07-4/+0
|
* Never skip sending reports with --debug flagDave Arter2018-01-29-1/+1
| | | | | | | It’s a little annoying to have to fiddle with the database between runs of send-reports when debugging a stuck/failing report or working on a new Open311 integration. This commit disables skipping of reports when the --debug flag is used.
* Fix error sending `requires_inspection` reports.Matthew Somerville2018-01-16-0/+1
| | | | | has_permission_to() is called in Reports.pm and requires the cobrand to be set on the schema. The test was manually doing this which hid the problem.
* [fixmystreet.com] Council average response time.Struan Donald2017-12-15-24/+3
|
* Store all successful send methods.Matthew Somerville2017-12-13-1/+3
|
* update-all-reports operate per body optionally.Matthew Somerville2017-10-20-49/+94
|
* Allow testing override of /reports data.Matthew Somerville2017-10-16-11/+3
|
* Fix issue sending alerts around no-text update.Matthew Somerville2017-10-06-13/+18
| | | | | | | | | If there was a normal email alert, and then an alert for an update with no text (so no email should be sent), it would still try to send the blank email, and then die because no e.g. $data{cobrand} set. This moves the skip-blank-update check higher up, above any email sending code.
* generate update text in alerts if problem state has changedStruan Donald2017-10-05-0/+15
|
* do not send blank problem update alertsStruan Donald2017-10-05-0/+1
|
* Adapt things that assume email will be present.Matthew Somerville2017-09-30-10/+20
| | | | | | This includes stopping some emails being sent (moderation, alert, questionnaire), dealing with Open311/email report sending, and tokenised_url.
* Hide things needing fixed state if no fixed state.Matthew Somerville2017-08-31-0/+3
| | | | | Front page stats, update form question, list filtering, plus do not send any questionnaires.
* Fix missing URLs in alert emailsDave Arter2017-08-22-1/+1
| | | | | | | | | If a staff user changed a problem’s state and an empty update was generated, it was possible for alert emails to be sent with missing URLs because the empty string in the update text was falsy and Alert.pm took the wrong path. This fixes the problem by changing the test to defined() and includes a regression test.
* Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-3/+3
| | | | Store a schema object on FixMyStreet::DB instead.
* Fix update-all-reports when database empty.Matthew Somerville2017-07-18-1/+6
|
* Use DateTime in update-all-reports for tests.Matthew Somerville2017-07-17-6/+8
| | | | The test fixes DateTime, which wouldn't affect direct database queries.
* Include area stats in all-reports.jsonDave Arter2017-07-17-14/+26
| | | | | | | This makes it possible to display stats per area on /reports Cobrands using this functionality should use the pre-dashboard reports/index.html template and pass --areas when calling bin/update-all-reports
* [fixmystreet.com] Fix /reports displaying months.Matthew Somerville2017-07-07-16/+25
| | | | | | Month strings weren't escaped in data label, and would never match database data (using month number). Also issues displaying current day/month in graph.