aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet
Commit message (Collapse)AuthorAgeLines
* Add customisable defect types.Dave Arter2017-03-23-0/+22
| | | | | | | | | Problems can have an associated defect type, that can be assigned during an inspection. Include an admin interface for managing these types, that can also be assigned on a per-category basis, currently available to the Oxfordshire cobrand. (Also include 'TM' in traffic management Exor RDI output.)
* Update priorities in inspect form on cat. change.Matthew Somerville2016-12-15-0/+22
| | | | | Different categories may have a different list of priorities, so store them all and update as the category changes.
* Add sort order options to list pages.Matthew Somerville2016-11-04-11/+23
| | | | | | | | Includes newest, oldest, least/most recently updated, and most comments. The default remains the same, which is last updated on /reports, and newest on /my and /around (the latter plus not-in-view sorted-by-distance ones).
* Merge branch 'issues/forcouncils/95-multi-select-list-filters'Matthew Somerville2016-10-13-4/+4
|\
| * Allow multiple selections in report list filter.Zarino Zappia2016-10-13-4/+4
| | | | | | | | | | | | This lets people filter by multiple categories or states. It uses our jQuery multi-select plugin to turn the <select multiple>s into little overlay lists of checkboxes. HTML5 history is also supported.
* | Adding report to shortlist removes from others.Matthew Somerville2016-10-11-0/+23
|/
* Pass back Open311 request through send_reports for tests.Matthew Somerville2016-08-24-1/+1
|
* Fix a crash on /admin/timelineDave Arter2016-08-15-2/+2
| | | | | The 'created' and 'state' column names are shared between the 'problem' and 'comment' tables, and this was causing ambiguous column references in the SQL.
* Helper function for fetching database secret.Matthew Somerville2016-02-19-0/+12
|
* Exclude update alerts from summary alert counts.Matthew Somerville2016-02-09-0/+8
| | | | | | There might be the odd update alert we are interested in (those not auto-signed up for as part of report or update creation), but they will be rare.
* Fix cobrand restriction of My/Nearby.Matthew Somerville2015-12-15-12/+15
| | | | | | | | | | | | 5c79337 simplified a bit too far, as after then a particular cobrand could in Nearby and My only filter reports to a particular body, not any other criteria. To fix this, introduce more generic functions in the default cobrand to allow more flexibility. Make sure a few tests delete their bodies fully so that new tests pass when run as part of the suite. Fixes #1289.
* Move main bin scripts to separate packages.Matthew Somerville2015-12-02-688/+9
| | | | Maintain old location wrappers.
* Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-6/+6
|
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-17/+19
| | | | Command line scripts don't need a full blown app, just database.
* Move EmailSend out of Catalyst for use elsewhere.Matthew Somerville2015-12-02-6/+24
|
* Speed up admin front page.Matthew Somerville2015-10-23-23/+31
| | | | | | | | * Don't show a categories summary unless asked via a link * Don't needlessly join in questionnaire/update summaries * Switch count(distinct()) to a subselect as it turns out select count(*) from (select distinct(user_id) from problem) temp; is a lot quicker than select count(distinct(user_id)) from problem;
* [Zurich] admin workflow changes available statesHakim Cassimally2015-10-06-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | See mysociety/FixMyStreet-Commercial#690 - external_message for Extern/Wunsch states - as per PDF mockups, the "public response" field is now editable from more states, namely: - Ruckmeldung ausstehend - Extern - Zustandigkeit unbekannt - Wunsch - Nicht kontaktierbar - Unsichtbar - test fixes NB: slight hack to reorder Zurich report_display tests As these remove 'investigating' from hidden_states, these break tests for default cobrand (the FMS::App code expects to be called once on request start, not multiple times within one test) - Not contactable button and tests for this and the similar `send_back` functionality (previously untested). NB: Unsure why we need to specify form_number=2 just for these submits, but test won't find the buttons otherwise. - Make sure SDMs' "time_spent" figure is recorded. (See mysociety/FixMyStreet-Commercial#718)
* Use base URL in cobrand alert for no-body report.Matthew Somerville2015-09-03-10/+2
| | | | | | If a cobrand has a body restriction, then a report without any body won't be shown on it, so we need to make sure links to the report (in email alerts and RSS) are to the base URL, not the cobrand.
* Merge branch '1070-dmarc-workaround'Matthew Somerville2015-08-19-9/+3
|\
| * Add default sender to send_email_cron.Matthew Somerville2015-08-19-9/+3
| | | | | | | | | | Matches send_email, remove unneeded setting of sender in one call, and add contact name to report sent email.
* | Fix issue with ambiguous 'deleted' column lookup.Matthew Somerville2015-08-19-1/+3
| |
* | Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-17/+30
| | | | | | | | | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* | Use ResultSet/cobrand->problems where appropriate.Matthew Somerville2015-08-19-2/+2
| | | | | | | | Fixes #893.
* | Move "missing" handling to separate column.Matthew Somerville2015-08-19-7/+12
|/
* Fix display of warning message in report sending.Matthew Somerville2015-08-13-1/+1
|
* Speed up new_updates query execution.Matthew Somerville2015-08-13-5/+6
| | | | | | | This makes no actual change to the query (the joins are all on the same value, after all), but along with the removal of ms_current_timestamp in the previous commit massively speeds it up as the query planner realises it can do a hash join rather than a nested merge join.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-15/+15
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Improve stored procedure performance.Matthew Somerville2015-08-10-12/+0
| | | | | Add an index on the radian values, make the function stable, and switch to a full bounding box rather than a slower angle check.
* Alter token logging in and timeout behaviour.Matthew Somerville2015-07-10-4/+3
| | | | | | | Restrict email_sign_in token to one day, unused confirmation tokens to one month. Used tokens will redirect to the created thing but not log in; don't log in with alert links (unsubscribe link never expires, reply link will still show "reopen" tickbox).
* Allow /ajax to be filtered by statusDave Arter2015-06-29-4/+12
| | | | | If present, the 'status' param can be set to 'open' or 'fixed' to display ensure only open or fixed reports respectively are included in the response.
* Add category filtering support to /ajax via 'category' GET paramDave Arter2015-06-29-2/+4
|
* [fixmystreet.com] Remove special NI code.Matthew Somerville2015-03-16-82/+70
| | | | | This is now handled by normal bodies in the admin. In order to remove references in send_reports, tidy up (unused) EmptyHomes code a bit.
* [UK] Output NI grid references to NI councils.Matthew Somerville2015-02-20-10/+14
|
* Switch easting/northing output to one line.Matthew Somerville2015-02-16-4/+1
| | | | | This is more friendly for e.g. copy and pasting by someone using the Dynamics CRM software. Fixes #997.
* Create timezone objects only once at startup.Matthew Somerville2015-02-13-13/+3
| | | | | | Cache a DateTime::TimeZone::Local object, so that in an environment where /etc/localtime is a copy of a timezone file, we don't repeatedly walk all the timezone files to find the matching one.
* Move site_title function to site-name web templateMatthew Somerville2015-01-19-2/+0
| | | | | | | This matches the email template behaviour, and makes it much easier to override without requiring a cobrand package file. Fixes #979.
* Use same handling for cron and non-cron email.Matthew Somerville2015-01-13-10/+4
| | | | | This means that e.g. SMTP authentication is used when set up by all emails, not just non-cron ones. Fixes #988.
* [Harrogate] custom form fieldsHakim Cassimally2015-01-08-0/+4
| | | | | | | | | | | | | | Requires previous (generic) commit to prevent information only categories (e.g. Dead animals message) from displaying a spurious textbox. Also support for sending these custom fields by email: Requires a hook in RS::Problem method, as by default, only a restricted number of hard-coded fields are send in the email. (And the template language is pseudo-PHP so we can't simply pass in the whole data-structure.)
* refactor repeat code into get_email_templateHakim Cassimally2014-08-14-21/+3
|
* Merge branch '700-auto-emails'Matthew Somerville2014-05-16-3/+10
|\
| * Update all email templates with new text.Myfanwy Nixon2014-05-16-0/+2
| | | | | | | | And FixMyStreet.com specific open questionnaire page.
| * Set site_name and signature email variables for alertsStruan Donald2014-05-16-3/+8
| | | | | | | | so we can include the name of the site non TT templated emails
* | Merge branch 'issues/commercial-503-centro-email'Steven Day2014-05-01-0/+2
|\ \ | |/ |/|
| * Fix missing subcategory_line that was breaking email sendingSteven Day2014-05-01-0/+2
| | | | | | | | | | | | subcategory_line is optional in seesomethingsaysomething, so we need to set it to something (a blank line is what I've chosen) otherwise email sending breaks when it tries to template up the email message
* | Add Cobrand config to include update date in email alertsStruan Donald2014-04-08-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for sites where the updates aren't published on the site so you need a bit more context in the email alerts. Add inlude_time_in_update_alerts to default cobrand, off as default If this is set then the date is added after the name string in the email, passing in 'alert' as the type to dt_prettify in order to allow the cobrand to format it accordingly. This does require pulling out the alert confirmed time from the database in the send_alerts code where it wasn't before.
* | Change default email indentation to none.Matthew Somerville2014-03-17-2/+0
| | | | | | | | | | This is very old, no-one seems to want/need it any more, and more than one reuser does not want it. Fixes #715.
* | Make sure language is set early enough in email alert loop.Matthew Somerville2014-02-26-1/+2
| | | | | | | | | | The call to set_lang_and_domain needs to happen before the first string is translated (the report state).
* | Make sure bodies returned in consistent order.Matthew Somerville2014-02-25-1/+4
| |
* | Test for admin_base_url in RS::ProblemHakim Cassimally2013-12-17-1/+6
| | | | | | | | | | Test that the slash is added in correct place (the base URL should not have its own trailing slash).
* | Rationalise trailing slashes from admin_base_urlHakim Cassimally2013-12-11-1/+1
| | | | | | | | | | | | Remove from admin_base_url (which wraps config vars like {ADMIN_,}BASE_URL) and add to places in code which aren't expecting it.