aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model
Commit message (Collapse)AuthorAgeLines
* [UK] Council reference in .com confirm sent email.Matthew Somerville2019-03-27-1/+1
|
* Don’t send questionnaires for closed reports.Dave Arter2018-10-26-4/+5
| | | | Fixes mysociety/fixmystreet-freshdesk#24.
* Add S3 photo storage backendDave Arter2018-09-28-0/+25
|
* Factor out photo storage into PhotoStorage::FileSystem backendDave Arter2018-09-28-1/+4
|
* Add hook for per-row questionnaire override.Matthew Somerville2018-09-13-2/+37
|
* [UK] Fix issue when body ID not equal to MapIt ID.Matthew Somerville2018-06-28-3/+5
| | | | | | | | | | | 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/+14
|\
| * Refactor out some session functions.Matthew Somerville2018-05-23-0/+14
| |
* | Escape data attributes in template.Matthew Somerville2018-05-23-39/+28
|/ | | | | | 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.
* ajax endpoint to return closest address.Struan Donald2018-05-09-1/+3
| | | | | | | | /ajax/closest will return ajax with details of the closest address to the lat/lon passed in from the Bing geocoder. Tidy up find_closest() to use overloaded string rather than passing in whether you want a string or not.
* Remove unused (except by tests) send_reports() fn.Matthew Somerville2018-01-15-6/+7
|
* Add 'verified' database columns for email/phone.Matthew Somerville2017-09-30-3/+2
| | | | | These are so we can state whether a user's email address or phone number have been verified by confirmation email/text.
* Fix issues with Open/Closed translated too early.v2.2Matthew Somerville2017-09-15-3/+24
| | | | | | | | | | | | | | 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.
* Merge branch 'move-report-states-to-database'Matthew Somerville2017-08-31-0/+62
|\
| * Remove hardcoded states from Problem model.Matthew Somerville2017-08-31-0/+62
| | | | | | | | | | We keep the internal states hardcoded, plus the core open (confirmed) and closed ones, but the remainder are moved to the database.
* | Add Extra->get_extra_field_valueDave Arter2017-08-31-0/+42
|/ | | | Allows easy display of Open311 field values for problems in templates
* Make sure gettext domain specified in all tests.Matthew Somerville2017-08-25-5/+0
|
* Faster /reports for inspectors, reduce db queries.Dave Arter2017-08-18-0/+5
|
* Store duplicate reverse lookups upon dupe setting.Matthew Somerville2017-08-17-0/+2
| | | | | | 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.
* Set up translatable category columns.Matthew Somerville2017-08-10-9/+0
| | | | | | 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.
* Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-2/+2
| | | | Store a schema object on FixMyStreet::DB instead.
* Add inactive state to categories.Matthew Somerville2017-07-14-3/+2
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* Return Response Priorities as JSON.pezholio2017-06-20-0/+103
| | | | | This now lets the response priority and defect type handling share the same code.
* Populate defect types dropdown on category changepezholio2017-06-20-3/+67
|
* Run each test file in a transaction.Matthew Somerville2017-06-20-58/+9
| | | | This means that the tests can be run in parallel.
* [UK] Remove requirement for fixed body IDs.Matthew Somerville2017-06-20-3/+3
| | | | | | | | | | | | 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.
* Auto-add strict/warnings/Test::More with TestMech.Matthew Somerville2017-05-31-29/+0
|
* Fix test that would not run offline.Matthew Somerville2017-05-25-3/+0
| | | | | Switch it to use our mock MapIt. Also remove other unused overrides to external services.
* Move alert signup logic out of controllerpezholio2017-05-05-0/+29
|
* Merge branch 'offline-tests'Matthew Somerville2017-03-28-5/+5
|\
| * Make sure all MapIt tests can run offline.Matthew Somerville2017-03-23-5/+5
| |
* | Add customisable defect types.Dave Arter2017-03-23-0/+67
|/ | | | | | | | | 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.)
* Use sender in From if From and To domains match.Matthew Somerville2017-03-14-5/+13
| | | | | | To deal with a recipient mail server not allowing inbound email using the same domain as an internal domain, e.g. https://community.mimecast.com/docs/DOC-1419
* Add is_in_progress Problem helper.Matthew Somerville2017-03-10-0/+16
|
* [Oxfordshire] Use 'days ago' format on problem listspezholio2017-02-27-1/+14
| | | | Fixes mysociety/fixmystreetforcouncils#98
* Add Problem->tokenised_url for logging user inpezholio2017-02-15-2/+29
| | | | | | 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/+44
|
* If a problem has duplicates, display them on its detail pageDave Arter2016-12-13-0/+11
|
* Fix list of response templates for a problem.Matthew Somerville2016-10-20-0/+14
| | | | | Instead of returning all templates for the problem's body, return those for the problem's category (or with no category).
* Adding report to shortlist removes from others.Matthew Somerville2016-10-11-0/+14
|
* Fix bug in fetching existing shortlisted report.Matthew Somerville2016-10-11-0/+4
| | | | | It would always create a new report rather than return an existing one, if present.
* Improve display of category extra data in admin.Matthew Somerville2016-09-09-4/+4
| | | | Allow get_extra_metadata to return all the data with no argument.
* Add user planned reports.Matthew Somerville2016-08-22-0/+34
| | | | | | A user with the appropriate permission can add/remove reports from their list of planned reports using a button on a report page. The list can be viewed at /my/planned.
* Shrink test sample photo.Matthew Somerville2016-08-16-1/+1
|
* Add HTML email templates.Matthew Somerville2016-08-01-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch '1347-fold-back-zurich'Matthew Somerville2016-06-29-6/+6
|\
| * Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-6/+6
| |
* | Use valid orientation flag for test imageDave Arter2016-06-27-1/+1
|/ | | | | | jhead 3.00 considers 0 an invalid value for EXIF orientation and will replace it with 1 when run with the -autorot flag. This was causing a test failure as the SHA hash of the sample image was being changed.
* Update tests for cobrand/template changes.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.