aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
Commit message (Collapse)AuthorAgeLines
* Warnfix for missing order in extra fields.Matthew Somerville2019-12-02-1/+1
|
* [Open311] protected is true/false string, not boolean.Matthew Somerville2019-10-09-3/+3
|
* Stop empty Open311 group causing duplicate historyMatthew Somerville2019-10-03-18/+16
| | | | | | | | It arises that <group></group> now passes to the code as a one-element list containing undef, which compared differently to what was stored - the code assumed lists would contain things. A new changelog entry was created each time. Hopefully resolve this once and for all by treating groups more formally and making sure we always have lists to compare.
* [IsleOfWight] do not send comment recording triage actionStruan Donald2019-09-27-4/+6
| | | | | This is only used for audit purposes on FixMyStreet and not required in Confirm.
* [Open311] Spot <groups> parameter rather than CSV.Matthew Somerville2019-09-20-12/+4
|
* [Open311] Add 'protected' category extra flag.Struan Donald2019-08-23-3/+21
| | | | | 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/+2
| | | | | | 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-129/+151
|
* [Open311] Remove update problem matching warning.Matthew Somerville2019-06-26-6/+0
| | | | Lots of false positives from other bodies too.
* [Open311] Allow description in email template.Matthew Somerville2019-06-20-4/+13
| | | | | 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-1/+28
| | | | | | | 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-1/+1
| | | | | 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-1/+4
|
* [Open311] Always mark fetched reports non_public for non_public contactsDave Arter2019-06-04-0/+1
| | | | | | 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/+17
| | | | | | | | | 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.
* [Bexley] Close updates if Open311 marks report closed/fixed.Matthew Somerville2019-05-28-0/+5
|
* [Open311] Only strip colons at end of description.Matthew Somerville2019-05-28-1/+1
|
* Fix some incorrect timezone code.Matthew Somerville2019-05-02-8/+10
| | | | | | | | | 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/+5
| | | | | 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.
* Factor to common FixMyStreet::MapIt call.Matthew Somerville2019-04-04-6/+2
|
* Merge branch 'open311-hook-update-params'Matthew Somerville2019-03-12-0/+1
|\
| * [Open311] Use cobrand hook for extra update paramsMatthew Somerville2019-03-08-0/+1
| | | | | | | | | | 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-2/+12
| | | | | | | | | | | | | | | | | | | | | | 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-3/+1
|/ | | | | Otherwise running on a site where one body ID is a substring of another, comments can get processed for the wrong body.
* [Open311] Refactor cobrand specific code.Matthew Somerville2019-01-23-54/+4
|
* [Bromley] Lights code is now SLRS.Matthew Somerville2019-01-11-1/+1
|
* [Open311] run cobrand description filtering if availableStruan Donald2019-01-04-0/+4
| | | | | 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/+3
| | | | | | | | | If there is <non_public>1</non_public> tag in an incoming service request then set the created report to non_public.
* [Open311] warn on staging if fail to match updatesStruan Donald2018-12-20-0/+4
| | | | | If we fail to match an update to a problem on the staging server then print a warning so we can diagnose issues.
* [Open311] Improve handling of created/updated datetimes of fetched reportsDave Arter2018-11-20-37/+42
| | | | | This should reduce the incidence of the ‘Problem id X for Y has an invalid time, not creating’ cron errors we’ve been seeing.
* Fix Open311 category group bugsDave Arter2018-11-07-11/+24
| | | | | | | - 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.
* Deal with possible multiple send_method_useds.Matthew Somerville2018-11-06-1/+1
|
* Only set Open311 category group if cobrand has groups enabledDave Arter2018-11-02-10/+20
|
* allow comment fetching to be limited by body nameStruan Donald2018-11-02-0/+5
| | | | | Allows creating scripts that fetch comments for a single body, e.g for batch updating or because they require special setup.
* do not reuse original open311 object in fetch comments loopStruan Donald2018-10-11-2/+2
| | | | | The //= meant that once `$open311` was populated we reused it each time which mean we were passing the original config in to each body.
* [Open311] More testing of GetServiceRequestUpdatesMatthew Somerville2018-10-09-13/+11
|
* [Open311] Move send-comments cobrand specific codeMatthew Somerville2018-10-09-54/+9
|
* Add get_cobrand_logged to Comment.Matthew Somerville2018-10-09-2/+1
|
* [Open311] Move send-comments code to package.Matthew Somerville2018-10-09-0/+174
|
* [Oxfordshire] remove open311 hardcodingStruan Donald2018-10-01-4/+0
| | | | | we no longer need some of the hardcoded oxfordshire Open311 overrides so remove them
* [Open311] add customer reference from update to problemStruan Donald2018-10-01-0/+7
| | | | | If an Open311 update has a customer_reference property then add that to the metadata for the problem.
* [Open311] No questionnaires on fetched reports.Matthew Somerville2018-09-18-0/+1
|
* Don’t crash when fetching Open311 requests with missing descriptionDave Arter2018-08-17-1/+1
|
* [Open311] No update text on fixed state move.Matthew Somerville2018-08-06-2/+4
| | | | | | 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.
* Map Open311 CLOSED status to closed state if extended statuses enabled.Dave Arter2018-06-21-3/+4
| | | | | | | | | | | | | | | | | | | | | The Open311 specification has two values for a report's status: - open: it has been reported. - closed: it has been resolved. FixMyStreet previously mapped 'closed' to 'fixed - council', but this has been causing issues with Open311 endpoints that want to mark a FMS report as closed but not fixed. The mySociety Open311 additions introduce extended statuses, some of which represent a 'closed' state e.g. duplicate, no_further_action, but there are times when a report should simply be closed without any indication why - for example, if open311-adapter is being used to integrate with a council system which has a closed state not represented by the extended statuses. Marking a report as 'closed' on a council system and displaying that as 'fixed' on the FixMyStreet front end is not an ideal situation. This commit changes the mapping of the Open311 'closed' status to the 'closed' FMS state when extended_statuses is enabled.
* [Oxfordshire] use localtime in open311 get update callStruan Donald2018-06-08-0/+2
| | | | | | | | | | As Oxfordshire uses local time and not UTC use that when calling the get update script. Also handle a date with a timezone being passed on the server side. And add some tests in for the oxfordshire open311 endpoint Fixes mysociety/fixmystreet-commercial#1062
* Don’t delete email contacts on devolved bodies.Matthew Somerville2018-06-06-21/+8
| | | | | If we assume that any body with can_be_devolved set is probably a mix of Open311/email, we can ignore any email address contacts for such a body.
* [Bromley] Add asset/PROW ID meta to attributes.Matthew Somerville2018-06-04-0/+19
|
* [Open311] Factor cobrand overrides to functions.Matthew Somerville2018-06-04-14/+28
| | | | [Stevenage] Make sure Other included, like East Herts.
* [Open311] Hide fetched update if no data to show.Matthew Somerville2018-04-27-2/+6
| | | | If no text, photo, or state change, hide the update from display.