aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311
Commit message (Collapse)AuthorAgeLines
* Fix unpredictable tests.Matthew Somerville2020-05-05-1/+1
| | | | The database could return rows in differing orders.
* Add contact flag to protect category/group names from Open311 changesDave Arter2020-04-28-0/+46
| | | | | | | Adds a new tickbox to the contact editing form that protects the category and group names from being changed by Open311. For mysociety/fixmystreet-commercial#1776
* [Open311] external status code takes precedence.Struan Donald2020-04-08-2/+77
| | | | | | | | Order the response templates query by external status code so if you have an update with an external status code the response template matching that is always used. Previously with the database left to determine the order it could pick a response template with a matching state rather than a matching external status.
* Combine and improve fetch-comments/reports scriptsMatthew Somerville2020-04-02-62/+2
| | | | | Make them take start/end hour arguments, cope if only one given, optional body, and combine them together in one `fetch` script.
* [Buckinghamshire] Update for change to unitary.Martin Wright2020-03-31-1/+1
| | | | New unitary branding, and remove County from name.
* [open311] always update problem state if no commentsStruan Donald2020-01-20-0/+34
| | | | | | | To avoid issues with autogenerated updates in the bodies back-end happening quicker that the back-end returns the external_id to us ignore the check for comment being earlier than the last update if it's the first comment.
* Scrub admin description fields.Matthew Somerville2020-01-09-2/+2
|
* Test warnfix on confirmed comments lacking time.Matthew Somerville2019-10-14-1/+1
|
* [IsleOfWight] tests for closing fetched closed updatesStruan Donald2019-09-27-1/+0
|
* [IsleOfWight] Initial cobrand.Struan Donald2019-09-27-20/+27
| | | | | | | | | Co-authored-by: Matthew Somerville <matthew@mysociety.org> Configured to allow: - updates only from original reporter - close updates from fetch reports - use OSM geocoder
* [Open311] Spot <groups> parameter rather than CSV.Matthew Somerville2019-09-20-46/+3
|
* [Open311] Add 'protected' category extra flag.Struan Donald2019-08-23-0/+128
| | | | | If an extra field on a category has a protected flag then do not overwrite or remove it when populating categories.
* [open311] unset the external_status_code if blankStruan Donald2019-07-31-0/+30
| | | | | | If an update with a blank external_status_code is fetched then unset it otherwise we will always a detect a change in the external_status_code which might mean phantom updates.
* [Open311] Refactor GetServiceRequestUpdates a bit.Matthew Somerville2019-07-15-26/+72
|
* [Open311] Remove update problem matching warning.Matthew Somerville2019-06-26-5/+1
| | | | Lots of false positives from other bodies too.
* [Open311] Allow description in email template.Matthew Somerville2019-06-20-1/+32
| | | | | By specifying a placeholder in an email template, it can be replaced by the description returned from the Open311 server.
* allow multiple groups in open311 services group tagStruan Donald2019-06-17-0/+142
| | | | | | | Only parses as multiple groups if cobrand is configured to handle them to stop issues with existing groups with commas in them. Groups are parsed as CSV so as to allow commas in group names.
* configure category_groups via COBRAND_FEATURESStruan Donald2019-06-17-15/+8
| | | | | Rather than have a method in the Cobrand module use the COBRAND_FEATURES section of the config file.
* [Hounslow] Don't fetch non_public reports at all from Open311Dave Arter2019-06-04-0/+69
|
* [Open311] Always mark fetched reports non_public for non_public contactsDave Arter2019-06-04-0/+38
| | | | | | This change ensures that a report fetched via Open311 for a non_public category will always be marked as non_public even if its Open311 XML doesn’t explicitly include the non_public tag.
* Mark Open311 contacts non_public according to service keywordsDave Arter2019-06-04-0/+101
| | | | | | | | | This allows the Open311 endpoint to include ‘private’ in the ‘keywords’ field of a service definition in order for it to be marked as non_public on FMS. NB existing categories may be updated to become non_public, but non_public categories will never have their non_public flag unset by PopulateServiceList. This is so any existing Open311 categories on FMS don’t suddenly become public.
* Merge branch 'bexley'Matthew Somerville2019-05-28-59/+66
|\
| * [Bexley] Close updates if Open311 marks report closed/fixed.Matthew Somerville2019-05-28-59/+41
| |
| * [Bexley] Initial cobrand.Matthew Somerville2019-05-28-0/+25
| |
* | Switch all Norwegian tests to Swedish.Dave Arter2019-05-28-5/+4
|/ | | | | | | | | | 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.
* [Travis] Split coverage tests, fix coverage ignoreMatthew Somerville2019-05-13-2/+11
|
* Fix some test warnings.Matthew Somerville2019-05-13-1/+5
|
* Fix some incorrect timezone code.Matthew Somerville2019-05-02-7/+8
| | | | | | | | | Times in the database should be stored in the application server's local timezone, by e.g. using `current_timestamp`, or by setting that timezone explicitly before storage (the database columns are all without timezone so any timezone info is silently ignored). Reports & updates fetched via Open311 and offline updates were being put into the TIME_ZONE setting if present, meaning they were stored incorrectly for future usage.
* [Open311] handle bad FixMyStreet id in updatesStruan Donald2019-04-09-0/+35
| | | | | If an update has a fixmystreet id in it check that it looks like an integer and if not issue a warning and skip the update.
* Merge branch 'open311-hook-update-params'Matthew Somerville2019-03-12-3/+8
|\
| * [Open311] Use cobrand hook for extra update paramsMatthew Somerville2019-03-08-3/+8
| | | | | | | | | | The test has to now create a new comment object each time as `get_cobrand_logged` is cached on the object.
* | [open311] optionally use fixmystreet_id to match update to problemStruan Donald2019-03-12-0/+54
| | | | | | | | | | | | | | | | | | | | | | If an update has a fixmystreet_id field then use the contents of that in preference to the external_id field to match an update to a problem. This handles the case where a report in a third party system passes through different types (eg inspection and defect), resulting in the external id changing. In this case it is sometimes possible to include the fixmystreet id in each type and hence use that to match things up at the fixmystreet side.
* | [Open311] Proper bodies check for sending updates.Matthew Somerville2019-03-12-2/+2
| | | | | | | | | | Otherwise running on a site where one body ID is a substring of another, comments can get processed for the wrong body.
* | [UK Councils] Make sure server_set as appropriate.Matthew Somerville2019-03-12-1/+26
|/ | | | | After the change in 1cff2a0e, we need to make sure this is set so that the relevant fields are not shown in the front end.
* Make sure raw RABX column is utf8-encoded.Matthew Somerville2019-03-06-0/+52
| | | | | | | | | | | | Without doing this, a call to e.g. $contact->set_extra_fields(@meta) in PopulateServiceList.pm, with an unchanged meta that contains some Unicode values, can write to the database (and cause an unneeded row in the history table), because the column from the database is UTF-8 decoded, whilst the new text is UTF-8 encoded. It looks like an attempt was made in filter_from_storage to fix this issue, but the column comparison for marking a column as dirty takes place without this being called.
* [Buckinghamshire] Question for on-road flytipping.Matthew Somerville2019-01-23-27/+118
| | | | | | | | This adds a question to check whether a flytipping report concerns flytipping on a road or not. Client-side, it is asked when a road is selected and destination adjusted according to the answer; server side it uses the answer to direct any both-tier submissions (from e.g. non-JavaScript or phone app).
* [Open311] Refactor cobrand specific code.Matthew Somerville2019-01-23-1/+5
|
* [Open311] run cobrand description filtering if availableStruan Donald2019-01-04-0/+51
| | | | | When fetching reports run them through the cobrands filter_report_description method if it exists.
* [Open311] handle non_public field when fetching requestsStruan Donald2019-01-04-0/+64
| | | | | | | | | If there is <non_public>1</non_public> tag in an incoming service request then set the created report to non_public.
* Fix getservicerequestupdates test failuresStruan Donald2018-11-26-4/+4
| | | | | | | | Some of these were occasional failures due to timing issues. One was due to a hard coded body id meaning the addition of bodies in other tests meant this was creating two bodies with the same id, which happened to be used in a test which depended on the bodies having different ids.
* Fix Open311 category group bugsDave Arter2018-11-07-4/+6
| | | | | | | - Group wasn’t being set correctly by open311-populate-service-list as cobrand attribute not being updated for each body. - Extra metadata was being persisted to the DB every time even if nothing had changed, causing lots of duplicate entries in contacts_history.
* Add tests for per-cobrand category group handlingDave Arter2018-11-02-21/+47
|
* allow comment fetching to be limited by body nameStruan Donald2018-11-02-0/+42
| | | | | Allows creating scripts that fetch comments for a single body, e.g for batch updating or because they require special setup.
* [Open311] More testing of GetServiceRequestUpdatesMatthew Somerville2018-10-09-9/+13
|
* [Open311] Move send-comments cobrand specific codeMatthew Somerville2018-10-09-1/+6
|
* [Open311] Move send-comments code to package.Matthew Somerville2018-10-09-0/+102
|
* Deal with a variety of low-level test warnings.Matthew Somerville2018-10-04-1/+4
| | | | | | | | | | * Stop red warning being output by S3 bucket creation failure test * Make sure 'num_old_reports' is always a number on /around pages * Stop 'category_extra' being generated when unnecessary * Prevent warning printed in getservicerequestupdates.t * Prevent info lines from being output in develop.t * Remove line of #s in root.t * And an ID diag in zurich.t
* [Open311] add customer reference from update to problemStruan Donald2018-10-01-0/+23
| | | | | If an Open311 update has a customer_reference property then add that to the metadata for the problem.
* Don’t crash when fetching Open311 requests with missing descriptionDave Arter2018-08-17-0/+21
|
* [Open311] No update text on fixed state move.Matthew Somerville2018-08-06-0/+20
| | | | | | A move between fixed states (presumably from fixed-user to fixed-council) should not count as a state change for the purposes of generating comment text from templates.