aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet
Commit message (Collapse)AuthorAgeLines
* Rename DB::ReportExtraFields to ReportExtraField.Matthew Somerville2019-05-02-1/+1
| | | | It was not being caught by rerun_dbic_loader.pl otherwise.
* Refactor nearby() to use named parameters not listMatthew Somerville2019-02-25-12/+12
|
* Make front page cache time configurable.Matthew Somerville2019-02-04-4/+8
| | | | | Add a configuration variable to use for the front page stats/ recent list, plus the max-age of `/reports`.
* Check cached reports have photos before showing.Matthew Somerville2019-01-10-1/+1
|
* add private only report filterStruan Donald2019-01-04-4/+13
|
* add report_mark_private permissionStruan Donald2018-11-12-1/+2
| | | | | | | | Allows user's to see the inspector panel to mark reports as Private, and also to view those non-public reports. Useful for call centre staff who want to record private reports but don't need to other permissions. Fixes mysociety/fixmystreet-commercial#1213
* Have body.url work in hashref lookup.Matthew Somerville2018-10-10-0/+8
| | | | | | | body.url could still be in use by old-school /reports table index pages (though they were dropped in 2.1, so a cobrand would have to have overridden it since then) and the update to speed up body lists in #2248 broke it. This puts it back in minimal form.
* Speed up fetching lists of bodies.Matthew Somerville2018-09-25-5/+74
| | | | | | Use a HashRefInflator wherever all_sorted is used, with consequential changes to deal with it now not being an object (e.g. add some with_* functions for manual fetching of extra data).
* Only display reports from last 6 months on around.Struan Donald2018-07-03-1/+7
| | | | | | | Add a checkbox to show older reports, plus if we get to the end of the new reports then instead of a Next button show a "show older" button that will reload the current page but with older reports also loaded. Wire it all up into the pushState code as well.
* Use correct created column in problem timeline.Matthew Somerville2018-06-13-3/+3
| | | | The User model now also has a created column.
* Escape data attributes in template.Matthew Somerville2018-05-23-8/+5
| | | | | | This fixes a bug whereby a double quote in an item would not be JSON-escaped due to being HTML-escaped first, meaning it would not parse as JSON on the client.
* Allow cobrands to give extra parameters for pins.Steven Day2018-05-02-1/+7
| | | | | | | So that you can build functionality to add extra limitations on to the map pins displayed. Useful for Collideoscope initially to filter out (or in) reports from the Department of Transport's Stats19 Data.
* Check recent reports for any hidden since cached.Matthew Somerville2018-04-06-22/+13
| | | | | Also stop caching lat/lon specific alert photo lists, and improve Memcached code.
* [Zurich] Switch to more modern database states.Matthew Somerville2018-03-07-2/+2
| | | | | | | 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!
* Show non_public reports to staff on list pages.Matthew Somerville2018-02-13-6/+34
|
* Remove unused (except by tests) send_reports() fn.Matthew Somerville2018-01-15-6/+0
|
* Add some new Body model helper methods.Matthew Somerville2018-01-03-3/+72
| | | | And use the existing ones more.
* Add pagination to around page.Matthew Somerville2017-11-06-3/+6
|
* Remove Show all pins link and on_map_list_limit.Matthew Somerville2017-11-06-7/+2
| | | | | /around will now show all reports all the time, but we are about to introduce pagination to stop that.
* generate update text in alerts if problem state has changedStruan Donald2017-10-05-1/+5
|
* Add 'verified' database columns for email/phone.Matthew Somerville2017-09-30-0/+35
| | | | | These are so we can state whether a user's email address or phone number have been verified by confirmation email/text.
* Revert using memcached cache in testing.Matthew Somerville2017-09-18-1/+4
| | | | This can fail if the tests are being run in parallel.
* Fix issues with Open/Closed translated too early.v2.2Matthew Somerville2017-09-15-3/+9
| | | | | | | | | | | | | | It was possible for _hardcoded_states to be reached with no locale selected (e.g. bin/update-all-reports), causing an error trying to translate Open/Closed. But translating those there wasn't correct, because that would then be cached and returned even if a different language was being used. Caching was ignored in testing, which did not help. We no longer translate the state names in their objects, only upon display at the point that we will know the locale. We can't simply return the translation of Open/Closed because there may be entries in the translation table as well.
* Remove hardcoded states from templates.Matthew Somerville2017-08-31-1/+2
| | | | | | | | | | | State display names are now got from the database wherever they are displayed, including admin dropdowns, list filters, and update meta statements. This also covers the open/closed/fixed 'groups'. This also fixes a bug whereby if e.g. an update has problem_state investigating, the next update has no problem_state, and the last update has investigating again, it was previously showing a state change to investigating on that third update.
* Remove hardcoded states from Problem model.Matthew Somerville2017-08-31-0/+77
| | | | | We keep the internal states hardcoded, plus the core open (confirmed) and closed ones, but the remainder are moved to the database.
* Faster /reports for inspectors, reduce db queries.Dave Arter2017-08-18-1/+11
|
* Add site-wide extra fields for reports, and admin UI to manageDave Arter2017-08-17-0/+25
| | | | | | | - Also provides an editor for the extra Open311 fields on contacts. - Adds .btn--small class for small buttons Fixes #1743.
* Add fn to fetch bodies plus the translated names.Matthew Somerville2017-08-15-0/+11
|
* Only use active categories for making new reports.Matthew Somerville2017-07-14-0/+5
| | | | | Inactive ones can still be used for e.g. list filtering, but not when making a new report.
* Add inactive state to categories.Matthew Somerville2017-07-14-5/+5
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* Update templates when category/state changed.Matthew Somerville2017-06-30-0/+27
| | | | | | When the category or state changes, the list of available templates updates (previously it was frozen at what the category was on page load, and didn't care about the state).
* Return Response Priorities as JSON.pezholio2017-06-20-13/+11
| | | | | This now lets the response priority and defect type handling share the same code.
* Populate defect types dropdown on category changepezholio2017-06-20-13/+19
|
* 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)