aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script
Commit message (Collapse)AuthorAgeLines
...
* 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.
* [fixmystreet.com] Fixed includes questionnaires.Matthew Somerville2017-07-07-1/+4
| | | | Questionnaire responses don't currently set problem_state.
* [fixmystreet.com] New version of /reports page.Zarino Zappia2017-07-06-0/+163
| | | | | | | | | | | This is a much broader summary page, plus a body name autocomplete. This uses a cut down version of chart.js. [1] [1] The full version was 149Kb (41Kb gzipped) plus you needed moment (50Kb/17Kb), for a total of 199Kb/58Kb. By stripping out unused graphs and code and config options, and switching to category axis rather than time, it is now a total of 39Kb/13Kb.
* Run each test file in a transaction.Matthew Somerville2017-06-20-0/+80
| | | | This means that the tests can be run in parallel.
* Remove final use of old DBHandle.Matthew Somerville2017-06-20-5/+2
|
* Tidy up find_closest* functions.Matthew Somerville2017-05-02-4/+4
| | | | | Allow find_closest to be called multiple times with only one lookup, and to return just its data, not a compiled string.
* Remove duplicate <> around envelope senders.Matthew Somerville2017-03-14-5/+1
|
* Send open reports regardless of current stateDave Arter2017-02-20-2/+2
|
* Add cobrand call_hook fn, calls a fn if defined.Matthew Somerville2017-02-15-3/+1
|
* [Oxfordshire] Old report archiving scriptpezholio2017-02-15-0/+141
| | | | | | | | | | | | | | | This script can be used for the bulk closure of old reports that haven't been updated in a long time. Reports that haven't been updated in a *really* long time (since 2014, by default) are simply closed, and those that haven't been updated since 2015 (by default) are closed and an email explaining the closure is sent to the report creator. This script can be used for other cobrands, but they'll need an archive.{txt,html} template in order for the emails to be sent. For mysociety/fixmystreetforcouncils#51
* Move staging flags to their own config variable.Matthew Somerville2017-01-10-1/+1
|
* Send reports immediately from users with enough reputationDave Arter2016-09-23-1/+8
|
* Merge remote-tracking branch ↵Matthew Somerville2016-09-20-1/+1
|\ | | | | | | 'origin/issues/forcouncils/89-tidy-report-admin-actions'
* | Add ‘trusted’ flag allowing users to make reports directlyDave Arter2016-09-20-3/+8
|/ | | | | When a trusted user makes a report in a category that requires inspection, it'll be sent immediately (i.e. without being inspected first).
* Add ‘Inspection required’ field to categoriesDave Arter2016-09-09-0/+6
| | | | | | | | | | | Categories can now require reports to be marked as 'inspected' via the frontend before they're sent by send-reports. A side-effect here is that send-reports will perform an extra n queries for each report, where n is the number of bodies that report is being sent to, but hopefully in practice this won't matter as it's an offline cronjob. See mysociety/fixmystreetforcouncils#50
* Pass back Open311 request through send_reports for tests.Matthew Somerville2016-08-24-9/+12
|
* Do not send alerts for hidden reports.Matthew Somerville2016-08-10-0/+2
| | | | Fixes #1461.
* Add HTML email templates.Matthew Somerville2016-08-01-28/+67
| | | | | | | | | | | | | | | | | | | | | | | | Design is all Zarino. This adds the ability to send HTML emails, including attached inline images. When included, this is done as a multipart/related email containing a multipart/alternative (of plain and HTML) and any attached images, so that the images are available even if HTML mail is not. The alert emails list data has been improved so it can be constructed in the templates rather than the code. Various templates have been tidied. Various workarounds for email clients have been made, including: * <th> is used so that the Android 4.x mail client can give them `block` styling in the small screen media query. * Font settings defined on every table cell (<th>) so that sans-serif fonts are used in Outlook, rather than Times New Roman. * A three-column wrapper table to create a 620px centred content area that also shrinks down on narrow screens. (Outlook doesn’t like max-width, so this is the simplest alternative.) * Enforcing a sensible (500px) min-width for the main content area, on clients that don’t support media queries (eg: native Gmail app). * Giant borders on buttons so Outlook displays them * Image alignment with align rather than float.
* Use normal user authentication to control access to /adminMatthew Somerville2016-07-19-0/+25
| | | | | | | | | - Adds is_superuser flag to User - Logged-in user must be a superuser or have from_body set in order to access anything within /admin - has_permission_to on a superuser will always return true - Only superusers can create/grant superusers - New `createsuperuser` command for creating superusers
* Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-14/+2
|
* Use only one templating system for emails.Matthew Somerville2016-05-25-14/+10
| | | | | | | Historically, emails sent offline (alerts, questionnaires, etc) used a different templating system from those sent by the website (e.g. login emails), though the newer system was also being used for the site name and signature of offline emails.
* Fallback if request to Gaze fails.Matthew Somerville2016-05-18-3/+3
| | | | Fixes #1286.
* Remove some unused cobrands.Matthew Somerville2016-04-20-25/+9
|
* Merge remote-tracking branch 'origin/1302-support-pngs'Matthew Somerville2016-04-20-1/+1
|\
| * Add PNG image support.Matthew Somerville2016-04-08-1/+1
| | | | | | | | | | | | | | Store image type along with hash in photo column, and use that when outputting images / generating URLs. Make sure all public photo URL generation goes through appropriate functions, and change temp URLs so the filename can be output directly from the list.
* | Display used send method in debug line.Matthew Somerville2016-04-19-1/+1
|/ | | | | This may be a contact send method if devolved, or the default if none set on the body.
* Better handle replies to bounce addresses.Matthew Somerville2016-02-23-1/+6
| | | | | | | | | | Auto unsubscribe alert bounces, forward on report bounces and alert replies to support, and send through to report creator non-bounce replies to their report (for systems that ignore both the From and Reply-To headers). Also forward any totally unparsed bounce to support to possibly then adjust this bounce handling.
* Skip sending if any body marks it for skipping.Matthew Somerville2016-02-11-4/+3
| | | | | | | If a report was sent to multiple bodies, one of which was set to skip, (e.g. temporarily turned off due to receiving issues), then the code would still try and send the report due to the other bodies, leading to multiple sendings and an error for the skipped body.
* Add OpenStreetMap URL to report email.Matthew Somerville2016-02-09-0/+3
|
* Move main bin scripts to separate packages.Matthew Somerville2015-12-02-0/+723
Maintain old location wrappers.