aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
Commit message (Collapse)AuthorAgeLines
* Improve wording/grammar when report is sent to more than two bodiesDave Arter2018-03-29-10/+14
|
* [Zurich] Prefetch report users, cache body lookupsMatthew Somerville2018-03-19-1/+2
|
* Pass columns CSV needs into Problem->as_hashref.Matthew Somerville2018-03-19-12/+12
| | | | Then it can skip working out some things as they are not needed.
* [Zurich] Switch to more modern database states.Matthew Somerville2018-03-07-1/+13
| | | | | | | 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!
* Hide 'updates not sent' message on reports sent via Open311Dave Arter2018-01-23-0/+27
| | | | | | | | | | | | | | | The 'updates are not sent to the council' message was incorrectly being shown on reports where updates would in fact be sent. This was affecting non-Bromley/Stevenage reports on fms.com and all cobrands using Open311. This commit moves the logic out of the template and adds the Problem->updates_sent_to_body method which inspects the receiving body's Open311 configuration to determine whether updates will be sent. The duplication of the Lewisham/Oxfordshire logic between Problem.pm and send-comments isn't ideal but hopefully there won't be any new Open311 bodies that only send and don't receive updates. If there are we'll have to look at refactoring that list.
* [Zurich] Allow publishing of individual photos.Matthew Somerville2018-01-18-32/+0
| | | | | When more than one photo has been uploaded, allow each one to be published/not independently.
* Store all successful send methods.Matthew Somerville2017-12-13-0/+11
|
* Fix issues with Problem->as_hashref.Matthew Somerville2017-11-30-2/+8
| | | | | Include actual times, not just human-readable ones, and make sure state is translated correctly.
* Adapt things that assume email will be present.Matthew Somerville2017-09-30-1/+10
| | | | | | This includes stopping some emails being sent (moderation, alert, questionnaire), dealing with Open311/email report sending, and tokenised_url.
* show nearest address for report in inspector panelStruan Donald2017-09-28-0/+9
| | | | | | | If we've stored the nearest address then display that at the top of the inspector panel. Fixes mysociety/fixmystreetforcouncils#234
* Fix bug in cookie passthrough query parameter.Matthew Somerville2017-09-27-5/+9
| | | | | For temp URLs there was not already a query string, and so "?" needs to be used rather than "&" when appending.
* include ward in dashboard csv exportStruan Donald2017-09-04-0/+1
| | | | | | | Adds a Ward column to the council dashboard CSV export with the name of the ward. Fixes mysociety/fixmystreetforcouncils#220
* Merge branch 'move-report-states-to-database'Matthew Somerville2017-08-31-38/+8
|\
| * Remove hardcoded states from Problem model.Matthew Somerville2017-08-31-38/+8
| | | | | | | | | | We keep the internal states hardcoded, plus the core open (confirmed) and closed ones, but the remainder are moved to the database.
* | Add LOGIN_REQUIRED config keyDave Arter2017-08-31-6/+12
|/ | | | If set to 1, this restricts all pages on the site to logged-in users.
* Drop council_states and $visible_states.Matthew Somerville2017-08-29-48/+4
|
* Use a schema cache to remember body lookups.Matthew Somerville2017-08-23-1/+5
|
* Cache Problem->bodies and prefetch the body areas.Matthew Somerville2017-08-18-7/+14
|
* Store duplicate reverse lookups upon dupe setting.Matthew Somerville2017-08-17-2/+13
| | | | | | This avoids the need to search the whole table to find a report's duplicates. And is easier than constructing an index or upgrading PostgreSQL.
* Prevent unnecessary string translation.Matthew Somerville2017-08-11-1/+1
| | | | | | Calling the function 'translate' causes gettext-extract to add the string to the .po file. Also, we no longer need an admin 'updated' message as the main form has its own success message.
* Set up translatable category columns.Matthew Somerville2017-08-10-7/+7
| | | | | | As category is used both for display and as a link between Problem and Contact tables, add `category_display` for use whenever a category is displayed.
* Resize pin image before compositing onto static mapDave Arter2017-07-24-0/+1
| | | | | | | | A recent change doubled the size of the pin images, which meant the static maps included in report emails had the pin in the wrong place because the compositing code made assumptions about the pin size which were wrong. This commit ensures the pin image is of a known size before compositing, putting the pins back in the right place.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-1/+14
| | | | | | | | | | | | Historically in UK cobrands, bodies have had IDs the same as the MapIt area ID they cover. This can be confusing (if you are setting up a dev environment, say) and should not be necessary. This commit removes the requirement entirely, by switching any ID checks to either the name of the body, or the actual area it covers. One note: the body name in the test has to match so that we do not get two bodies both covering 2237 created. This will not be necessary when the tests are compartmentalized in the next commit.
* [Oxfordshire] Show problem state in marker tooltipZarino Zappia2017-06-10-2/+3
| | | | Add hook so that cobrands can change pin hover title.
* Refactor pretty state display.Matthew Somerville2017-06-10-13/+0
|
* Add customisable defect types.Dave Arter2017-03-23-2/+27
| | | | | | | | | 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.)
* Add is_in_progress Problem helper.Matthew Somerville2017-03-10-0/+10
|
* Refactor SendReport::Open311 to use cobrand hooks.Matthew Somerville2017-03-09-3/+1
| | | | | | | | | | | | | | Avoid doing cobrand-specific logic within SendReport::Open311. The hooks defined are: open311_config: set extra fields open311_pre_send: set endpoints and munge data These are tested in the new t/app/sendreport/open311.t, which does not send any actual reports, but just checks that all the data is munged into the expected format. (tests under t/open311* should already test the actual sending) Remove unused Open311 special cases.
* [Oxfordshire] Use 'days ago' format on problem listspezholio2017-02-27-0/+14
| | | | Fixes mysociety/fixmystreetforcouncils#98
* [Oxfordshire] Add Exor RDI file download featureDave Arter2017-02-15-0/+9
| | | | | | | | | | The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
* Add cobrand call_hook fn, calls a fn if defined.Matthew Somerville2017-02-15-14/+5
|
* Add Problem->tokenised_url for logging user inpezholio2017-02-15-0/+26
| | | | | | This method creates a token that logs the reporting user in, optionally with some parameters which are stored with the token for use when redirecting after login.
* Add Problem->time_ago for pretty-printed durationpezholio2017-02-15-0/+14
|
* [Oxfordshire] Allow cobrand-specific traffic management optionsDave Arter2017-02-08-0/+13
| | | | Fixes mysociety/fixmystreetforcouncils#159
* No need to translate this string at present.Matthew Somerville2017-01-21-1/+1
|
* Show user details for users with correct permissionspezholio2017-01-17-4/+12
|
* Merge branch 'issues/forcouncils/108-pick-up-a-priority'Matthew Somerville2016-12-15-10/+1
|\
| * Update priorities in inspect form on cat. change.Matthew Somerville2016-12-15-10/+1
| | | | | | | | | | Different categories may have a different list of priorities, so store them all and update as the category changes.
* | Display nearby candidate reports when marking as duplicateDave Arter2016-12-13-0/+1
| | | | | | | | | | | | | | | | - Use Problem->pin_data for single report page - Promote markers_highlight to fixmystreet.maps API We want to highlight map pins on the duplicate report selection UI, so let's use what's already there instead of writing something new. - Make sure duplicate report pins aren’t draggable
* | If a problem has duplicates, display them on its detail pageDave Arter2016-12-13-0/+12
| |
* | Add test for correct display of duplicate reportDave Arter2016-12-13-2/+3
| |
* | Store and display selected duplicate reportDave Arter2016-12-13-0/+11
|/
* Always return arrayref from bodies_str_ids.Matthew Somerville2016-11-29-1/+1
| | | | Prevents potential odd-element hash in e.g. response_priorities.
* Only return active shortlisted user for a problem.Matthew Somerville2016-10-28-4/+2
|
* Merge branch 'issues/forcouncils/100-fix-template-list'Matthew Somerville2016-10-20-4/+6
|\
| * Fix list of response templates for a problem.Matthew Somerville2016-10-20-4/+6
| | | | | | | | | | Instead of returning all templates for the problem's body, return those for the problem's category (or with no category).
* | Clarify category behaviour for response prioritiesDave Arter2016-10-19-1/+1
|/ | | | | - Priorities with no categories selected are available to all categories - Display active categories in response priorities table
* Show shortlist owner on report page.Matthew Somerville2016-10-11-0/+12
|
* Refactor problem response priority into its own modelDave Arter2016-09-09-39/+73
| | | | | | | This moves the response priority values from a cobrand-specific method to a full DB model, and includes management screens in the admin for administering them. For mysociety/fixmystreetforcouncils#66
* [Oxfordshire] Display confirmed reports as received by the CouncilDave Arter2016-09-08-0/+7
| | | | | | | | This introduces a new `is_council_with_case_management` flag for Cobrands, that, when active, considers any report that's been confirmed as having been received by the Council in question. See mysociety/fixmystreetforcouncils#65