aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model
Commit message (Collapse)AuthorAgeLines
* [UK Councils] Ensure response templates owned by other bodies aren’t visibleDave Arter2019-12-09-6/+6
|
* Fix broken alert_type test.Matthew Somerville2019-12-08-12/+15
|
* Replace use of FixMyStreet::App with DB in tests.Matthew Somerville2019-11-22-21/+18
|
* Store email addresses report sent to on the reportMatthew Somerville2019-11-10-0/+3
|
* add a get_extra_field method to Extra roleStruan Donald2019-10-28-0/+47
| | | | | accepts name or code for finding the field. Useful for checking for individual open311 fields that don't have a value.
* Per-test file email addresses.Matthew Somerville2019-10-03-3/+3
|
* Add two new helper functions to Roles::Extra.Matthew Somerville2019-09-30-0/+25
| | | | For updating/removing an extra field.
* Slightly simplify new report category handling.Matthew Somerville2019-09-05-9/+0
|
* DB changes to support OIDC authDave Arter2019-08-16-0/+25
|
* Switch all Norwegian tests to Swedish.Dave Arter2019-05-28-8/+8
| | | | | | | | | | On Macs, the Norwegian locale is no_NO, whereas on Debian it is nb_NO: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=206474 This can cause issues running the Norwegian tests on Macs with certain setups (e.g. on my machine a Homebrew installation of perl and gettext fails, but MacPorts and system pass). As Swedish is sv_SE in both, the easiest solution is to switch the tests to Swedish.
* Merge in upgraded Catalyst branch.Matthew Somerville2019-05-14-1/+2
|\
| * Update a number of packages.Matthew Somerville2019-05-13-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update: * Catalyst * Specify Catalyst::DispatchType::Regex explicitly * Remove Catalyst::Plugin::Unicode::Encoding * Catalyst::Plugin::SmartURI * Specify URI::SmartURI explicitly * Catalyst::Plugin::Static::Simple * CGI * Class::Load * DateTime * DateTime::TimeZone * DBD::Pg * DBIx::Class * DBIx::Class::EncodedColumn. * Email::Address. * Email::MIME * ExtUtils::MakeMaker * ExtUtils::ParseXS (for Params::Classify upgrade) * File::ChangeNotify * Image::Size * IO::Socket::SSL * local::lib * Moo * Moose (and some related others due to deprecations) * namespace::autoclean * Net::Server * Net::SSLeay * Number::Phone * Plack * Starman * Template * Test::PostgreSQL * Test::WWW::Mechanize::Catalyst * Text::CSV * YAML carton install was run on a wheezy box, the oldest that is supported, to make sure the required minimal vesions of core modules weren't removed from the snapshot. Cpanel::JSON::XS, Devel::GlobalDestruction::XS, and MooseX::NonMoose were then put back in the snapshot, in case another system needs them (e.g. system Perl on Mac looks for MooseX::NonMoose).
* | Prevent previous commit issue ever happening again.Matthew Somerville2019-05-07-3/+13
|/
* [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
|