aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311.pm
Commit message (Collapse)AuthorAgeLines
* Rewrite open311-update-reports to share code.Matthew Somerville2020-07-06-1/+3
| | | | | Make GetUpdates and GetServiceRequestUpdates share a common base; spot all visible states.
* [Westminster] Ignore immediate failures on sendingMatthew Somerville2020-01-09-4/+4
|
* [Open311] Spot <groups> parameter rather than CSV.Matthew Somerville2019-09-20-0/+1
|
* Allow more characters in name splitting.Matthew Somerville2019-09-03-1/+1
| | | | Not sure how this has not arisen before!
* Add Open311::always_upload_photos flag to send all photos, not just privateDave Arter2019-08-16-1/+2
| | | | This is intended to be used by Westminster, but not quite yet.
* [Open311] Include account_id in POST Service Requests if presentDave Arter2019-08-16-0/+2
|
* [Open311] Make sure Open311 parameters are encodedMatthew Somerville2019-06-12-1/+10
| | | | | This was previously done automatically, but isn’t when you do file uploads.
* Allow file uploading when sending Open311 service requestsDave Arter2019-06-06-2/+68
| | | | | | | | | | | This adds a new upload_files flag (which cobrands can set in their open311_config method) to Open311 which means any general enquiry files are POSTed to the Open311 endpoint in a multipart/form-data request. Photos on hidden reports are also sent if this flag is set, because they wouldn't be accessible to the Open311 endpoint via media_url as the reports are non_public. This feature is not part of the Open311 specification.
* [Open311] Factor GET/POST calls together.Matthew Somerville2019-04-05-62/+41
| | | | This means GET errors will give better output.
* [Open311] Use cobrand hook for extra update paramsMatthew Somerville2019-03-08-8/+4
| | | | | The test has to now create a new comment object each time as `get_cobrand_logged` is cached on the object.
* [Open311] Prevent warning on bad error response.Matthew Somerville2018-12-08-2/+5
|
* Add get_cobrand_logged to Comment.Matthew Somerville2018-10-09-1/+1
|
* [Open311] Add ability to send reopen status.Matthew Somerville2018-10-08-0/+3
| | | | Switch on for Buckinghamshire.
* [Open311] turn on comment sending for OCCStruan Donald2018-10-01-1/+6
| | | | | but only send if the problem as a customer reference and use that as the external id reference
* [Oxfordshire] remove open311 hardcodingStruan Donald2018-10-01-3/+1
| | | | | we no longer need some of the hardcoded oxfordshire Open311 overrides so remove them
* Map Open311 CLOSED status to closed state if extended statuses enabled.Dave Arter2018-06-21-1/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* [Open311] Cope with undefined names.Matthew Somerville2018-05-23-2/+4
|
* [Open311] avoid spurious warning when params are undefStruan Donald2018-04-17-2/+17
| | | | | | | If there was an undefined parameter passed to `_post` then generating the debug string would generate a warning about an undefined value in a concatenation. So, check for undefined params and substitute empty string to avoid.
* [Open311] correctly handle one word names when splittingStruan Donald2018-04-17-2/+10
| | | | | | If a name only had a single word we were failing to split it and not setting `first_name`. Also refactor splitting out to a function so the regex is only in one place.
* [Open311] Pretty print all request parameters.Matthew Somerville2018-04-13-4/+9
|
* send multiple photos over open311Struan Donald2018-03-15-1/+6
| | | | | | | | Per cobrand configurable option to send multiple photos over open311 instead of just a single one. Does this by sending multiple media_url parameters in the POST body. The default remains to send the first photo associated with a report.
* fetch new problems over open311Struan Donald2018-03-15-3/+40
| | | | | | | | | | This enables the display of existing reports from the back end on FMS if the body is configured to do this. Reports will not be created if they are missing an id, a lat or a long, if the lat/long is outside the area covered by the body, if there is already a report with a matching id, or if we can't parse out the request time.
* [UK] Improve Open311 update Bromley-only check.Matthew Somerville2018-02-23-1/+2
| | | | | The addition of e.g. questionnaire_id to an update's extra field means this check has to be more nuanced.
* [Bristol] Always include an email address for Open311 reportsDave Arter2018-02-19-0/+7
|
* Adapt things that assume email will be present.Matthew Somerville2017-09-30-6/+6
| | | | | | This includes stopping some emails being sent (moderation, alert, questionnaire), dealing with Open311/email report sending, and tokenised_url.
* [Bristol] Switch Open311 warnings off, false +ves.Matthew Somerville2017-07-08-1/+1
|
* [FixaMinGata] Consolidate with upstream.Jon Kristensen2017-07-07-0/+1
| | | | | Add hook for post-title field content in report form. Update translations.
* [Bristol] Switch warn threshold to five failures.Matthew Somerville2017-05-19-4/+22
|
* Open311 warn only after a couple of failures.Matthew Somerville2017-01-19-4/+4
| | | | | There are a couple of servers we currently talk to that error not that infrequently but work in the end.
* Make sure Open311 passed coordinate is decimal.Matthew Somerville2016-08-21-2/+3
|
* Tidy up some UK specific easting/northing handlingMatthew Somerville2016-06-22-1/+1
|
* Tidy up Open311 XML handling.Matthew Somerville2016-06-15-41/+31
| | | | | Parse the XML in such a way other parts of the code do not have to worry about single-value folding or the like.
* 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.
* Move from Moose to Moo in non-App code.Matthew Somerville2015-12-02-16/+17
| | | | And create default cobrand class without all of Moose.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-0/+2
| | | | Command line scripts don't need a full blown app, just database.
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-12/+8
| | | | | | | | | Historically, the extra field has been used in two different ways by different cobrands, both as a list (e.g. Open311 category fields) and a hash (e.g. the Zurich cobrand). This commit consolidates usage, adding an API to make use of the field easier and always returning a hash for the code to use. Fixes #1018.
* Add Open311 i18n test, and add utf8 pragma.Matthew Somerville2014-12-10-0/+1
| | | | Also remove some unused variables.
* Only have jurisdiction_id in request if present.Matthew Somerville2014-11-26-7/+7
| | | | | | So don't request '...services.xml?jurisdiction_id=' as that can lead to an error from an Open311 server that expects either no parameter at all or a stated jurisdiction_id.
* Open311. Remove extraneous 'jurisdiction' parameterHakim Cassimally2014-10-16-1/+0
| | | | | | | This parameter was added in 3eb93cea4acd5f9b76efdc0910466363a0b9b445 and is superfluous (as jurisdiction*_id* is the correct parameter, and is already sent.) That commit mentions only api_key so understand this wrong parameter is an artefact.
* Add extra Open311 strings for FixaMinGataJon Kristensen2014-03-14-0/+4
|
* Fix slight regression in cf20c709, to still match all UK cobrands.Matthew Somerville2014-03-13-1/+1
|
* Merge remote branch 'origin/sweden-rebase'Matthew Somerville2014-03-11-13/+12
|\ | | | | | | | | | | | | Conflicts: bin/update-schema locale/sv_SE.UTF-8/LC_MESSAGES/FixMyStreet.po perllib/FixMyStreet/DB/Result/Body.pm
| * Alter Open311 description to only include English on FixMyStreet.Jon Kristensen2014-03-11-13/+12
| | | | | | | | This could be made cobrand-customisable in future.
* | Default lastname of '-' if none found.Matthew Somerville2014-01-14-0/+1
|/
* Open311 should user name from report not userStruan Donald2013-08-19-1/+1
| | | | | Open311 was using the name in the user table for it's reports when it should be the one in the problem table.
* Remove *_local tz functions, set timezone on fetching original columns from ↵Matthew Somerville2013-02-14-1/+1
| | | | database.
* add internal review status to problemsStruan Donald2013-01-17-0/+2
|
* do not attempt to process empty service list contentStruan Donald2013-01-16-1/+5
|
* Merge branch 'bromley-new-statuses'Struan Donald2013-01-16-1/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/send-comments conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/Open311.pm t/app/controller/report_updates.t t/open311.t templates/web/default/report/display.html templates/web/default/report/updates.html templates/web/fixmystreet/report/display.html
| * use the problem_state of the comment to set the update state ratherStruan Donald2012-11-22-9/+14
| | | | | | | | | | | | than the state of the problem in case a second update has changed the problem state since. On the of chance that there is no problem_state for the comment then fall back to the state of the problem