aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
Commit message (Collapse)AuthorAgeLines
* [UK] Re-include Bristol in open311-populate-service-listDave Arter2018-01-18-1/+2
| | | | | | | | | | | | Bristol's Open311 endpoint still seems to be returning empty metadata for some services that claim to have metadata. They have made changes to their published services since the change was made to exclude their endpoint, which is causing issues for new reports. Rather than exclude their endpoint entirely from being updated, this commit just silences the noisy error message for Bristol. Reverts the change made in 491eb26e4.
* Store group on Contacts in Open311 PopulateServiceListDave Arter2017-12-05-1/+13
|
* Use response template for Open311 updates without ‘description’ textDave Arter2017-12-04-4/+19
| | | | | | | If an Open311 service request update with an empty description field is received and there is a matching ResponseTemplate for the problem's category & state (and it's marked as auto-response) then the text from that ResponseTemplate will be used for the created update.
* [East Herts] Preserve 'Other' category in PopulateServiceListDave Arter2017-11-29-0/+8
|
* Drop council_states and $visible_states.Matthew Somerville2017-08-29-1/+1
|
* Move FixMyStreet::DB to FixMyStreet::DB::Schema.Matthew Somerville2017-08-09-2/+2
| | | | Store a schema object on FixMyStreet::DB instead.
* [Oxfordshire] Open311 update, no open state switchMatthew Somerville2017-08-02-0/+3
|
* Add inactive state to categories.Matthew Somerville2017-07-14-8/+5
| | | | | A new 'state' column replaces confirmed and deleted, allowing categories to be unconfirmed, confirmed, deleted or inactive.
* Automatically spot Open311 co-ord/ID attributes.Matthew Somerville2016-08-24-6/+6
|
* Remove Open311 endpoint to separate repo.Matthew Somerville2016-08-23-2338/+0
|
* Skip incoming Open311 update if no ID or content.Matthew Somerville2016-08-10-0/+1
|
* [Bristol] Bristol City Council cobrand frontendDave Arter2016-06-17-3/+4
| | | | For mysociety/FixMyStreet-Commercial#766.
* Improve Open311 handling of bad attribute data.Matthew Somerville2016-06-17-1/+1
| | | | | We have seen e.g. an endpoint that is returning 'serviceAttributes' as the child of 'attributes', rather than 'attribute'.
* Fix Open311 service code check.Matthew Somerville2016-06-17-1/+1
| | | | The service code could be "0".
* Fail nicely if Open311 response lacks service codeMatthew Somerville2016-06-15-6/+10
|
* Tidy up Open311 XML handling.Matthew Somerville2016-06-15-27/+7
| | | | | Parse the XML in such a way other parts of the code do not have to worry about single-value folding or the like.
* Skip fetched updates if they're out of date range.Matthew Somerville2016-04-26-2/+7
| | | | | Even when we ask for a specific range of dates, we sometimes get given more in the response.
* Remove some unused cobrands.Matthew Somerville2016-04-20-1/+0
|
* Updates to cpanfile and code for perl 5.20/5.22.Matthew Somerville2016-03-23-1/+1
| | | | | | | | | | | | | | | | | | | | The following modules had bugs that have been fixed for working in recent perls: * List::MoreUtils * Guard * PadWalker * aliased * URI * Convert::NLS_DATE_FORMAT The CGI module was removed from core in 5.20, so include it in the snapshot (I don't think it's actually used, but is a dependency). "{" needs to be escaped in regular expressions, and ~~ should not be used. Fix some tests that expect e.g. a certain hash ordering, to use sorted output or better comparisons.
* Only load images from disk when needed.Matthew Somerville2016-02-23-2/+1
| | | | Fixes #1337.
* Spot media_url in Open311 GetServiceRequestUpdate.Matthew Somerville2016-01-29-0/+14
| | | | Fixes #1315.
* Switch to JSON::MaybeXS, remove JSON::XS.Matthew Somerville2016-01-22-1/+1
| | | | | | Travis has Cpanel::JSON::XS preinstalled, which means that the build would fail there, as JSON::MaybeXS would try and upgrade JSON::XS to version 3 which the snapshot did not contain.
* Remove many uses of mySociety::Config.Matthew Somerville2015-12-02-1/+1
|
* Move from Moose to Moo in non-App code.Matthew Somerville2015-12-02-5/+5
| | | | And create default cobrand class without all of Moose.
* Reduce use of FixMyStreet::App.Matthew Somerville2015-12-02-18/+14
| | | | Command line scripts don't need a full blown app, just database.
* Simplify/consolidate body restriction db code.Matthew Somerville2015-08-19-9/+6
| | | | | | | Make dashboard work properly in two-tier councils, showing reports sent to both. Create an index on the array of the bodies_str column to speed up performance, and use that throughout the code replacing all LIKE scans. This also enables a simplifying tidy of the restriction code.
* Remove ms_current_timestamp() override function.Matthew Somerville2015-08-13-3/+3
| | | | | This override is not used anywhere, it dates from a very old long-gone test script, and causes issues with database query planning.
* Add Extra role to ease use of {extra} field.Hakim Cassimally2015-03-20-5/+1
| | | | | | | | | 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.
* Better error if Open311 returns nil service list.Matthew Somerville2014-11-21-8/+10
| | | | | | | | If an Open311 server responded with e.g. '<services></services>', you got a strange hash error as the code treated it as one undef service. Spot this at the same point we check anything was returned. Also remove a couple of warnings due to lc of a maybe-undef variable.
* [Warwickshire]. PopulateServiceList deletion tweakHakim Cassimally2014-10-16-4/+15
| | | | | | as WCC is (during beta) mixed email (manually updated) and Open311, override the behaviour to delete contacts not returned by service list, to ignore ones that look like email addresses.
* [Warwickshire] Integration bits during/after visitHakim Cassimally2014-10-16-34/+71
| | | | | | | - Tweaks required to get things working in WCC environment - update Open311 to onsite changes - updated Open311 parameters after WCC's Bentley and County Highways workshop. - ... including ce_cpr_id
* Open311: FMS <-> Open311 Endpoint End to end testsHakim Cassimally2014-10-16-0/+1
| | | | | Uses LWP::Protocol::PSGI to avoid having to spawn external processes in order to test these end to end.
* Open311 tweaks to get round-tripping workingHakim Cassimally2014-10-16-1/+2
| | | | | If https://github.com/mysociety/fixmystreet/pull/792 is accepted then this should be rewritten in terms of that.
* Open311 Warwick (Exor) IntegrationHakim Cassimally2014-10-16-13/+576
| | | | | | | | | | | | | | | | | | | | | | | ::Integration::Warwick subclasses ::Integration::Exor refactor request_class and new_request Exor service Warwickshire updates retrieval, with datetimes stubbing out of Oracle constants, for local testing We also edit FMS's core PopulateServiceList routine to hide system fields from FMS: Bromley/Warwickshire send metadata in their services/FOO.xml advising that you can pass, e.g. attributes[easting]. FMS by default shows all of these to the user to fill in, however we don't *want* the user to supply these, rather they are added by the cobrand. Bromley had an exception for this (keyed by $body->areas->id). We write this more generally for Warwickshire too, keying instead by $body->name (as this is far less likely to be overridden for installs using global or custom Mapit's)
* Open311 Role for accepting default config fileHakim Cassimally2014-10-16-0/+30
| | | | | | | | See also MooX::ConfigFromFile, but that's underdocumented and seems overengineered -- may be worth implementing if requirements become more complex however. (See also Config::Any, which is well worth doing in future, using YAML only reflects current usage in FMS though.)
* Open311 Endpoint mySociety extensions roleHakim Cassimally2014-10-16-3/+284
| | | | | | | | | | | | | | * Get Service Request Updates This requires a new object ::Service::Request::Update, which of course is not part of standard spec. So, in order to make the core not too contaminated by : * the endpoint should instantiate ::Service::Request::mySociety objects which know about updates * have added a learn_additional_types callback from Schema to Endpoint, so that core doesn't need to know about /open311/service_request_update * (but ::Spark knows about the exception for updates... meh, but is 1-line)
* Open311 EndpointHakim Cassimally2014-10-16-0/+1439
| | | | | | | | | | | | | | | | | | | | | Subsystems include * ::Spark encoding conventions for xml/json * ::Schema using Rx to validate form of inputs and outputs, including validation for, e.g., dates and CSV as part of Open311 Handles following paths: * Open311 attributes for Service Definition http://wiki.open311.org/GeoReport_v2#GET_Service_Definition * POST service request * GET Service Requests * GET Service Request Objects: * ::Service * ::Service::Request
* Update old-style open311 script to use bodies.Matthew Somerville2014-04-07-13/+9
| | | | Add some comments to the top of the open311 bin scripts.
* Add test for de47a7f.Matthew Somerville2014-03-12-1/+1
| | | | | | This tests that the default string used by the old-style Open311 update code if there is no incoming string and the report is marked fixed, is translated.
* Merge remote branch 'origin/sweden-rebase'Matthew Somerville2014-03-11-0/+84
|\ | | | | | | | | | | | | Conflicts: bin/update-schema locale/sv_SE.UTF-8/LC_MESSAGES/FixMyStreet.po perllib/FixMyStreet/DB/Result/Body.pm
| * Make sure language is set before updating report.Matthew Somerville2014-03-11-0/+2
| | | | | | | | So that e.g. 'Closed by council' is translated.
| * Bring back open311-update-reports, GetUpdates.pm and getupdates.tJon Kristensen2014-03-11-0/+82
| | | | | | | | | | | | This commit reverses the "Remove unused Open311 GetUpdates code." commit. FixaMinGata, the Swedish FixMyStreet cobrand, is still using open311-update-reports.
* | Fix uncommon Open311 errors on processing updates.Hakim Cassimally2014-02-27-5/+7
| | | | | | | | | | | | | | | | | | | | | | Fixes #677. The query to fetch the related alert sometimes: * retrieves no result, causing an error on $alert->id * retrieves multiple results, causing deprecation warnings (e.g. which may at some point become future errors in DBIC) This commit turns the resultset('DB::Alert')->find(...) into a search(...) and loops over the results, to suppress them.
* | Don't update problem state from service request if currently hidden.Matthew Somerville2014-01-30-1/+3
|/
* Replaced hardcoded Mapit-URL in error message to use variable from config ↵Rikard2013-08-30-1/+2
| | | | instead
* Check for only one result, fixes #359.Matthew Somerville2013-03-18-1/+4
|
* Remove *_local tz functions, set timezone on fetching original columns from ↵Matthew Somerville2013-02-14-1/+1
| | | | database.
* Remove all special body handling in order to move FMB to use bodies properly.Matthew Somerville2013-02-04-6/+4
|
* Merge remote branch 'origin/zurich'Matthew Somerville2013-02-04-127/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/open311-populate-service-list bin/send-comments bin/update-all-reports conf/crontab.ugly db/schema.sql perllib/FixMyStreet/App/Controller/Admin.pm perllib/FixMyStreet/App/Controller/Report/New.pm perllib/FixMyStreet/App/Controller/Reports.pm perllib/FixMyStreet/Cobrand/Default.pm perllib/FixMyStreet/Cobrand/LichfieldDC.pm perllib/FixMyStreet/DB/Result/Open311conf.pm perllib/FixMyStreet/DB/Result/Problem.pm perllib/FixMyStreet/DB/ResultSet/Problem.pm perllib/FixMyStreet/SendReport.pm perllib/FixMyStreet/SendReport/Email.pm perllib/FixMyStreet/SendReport/Open311.pm perllib/Open311/GetServiceRequestUpdates.pm perllib/Open311/PopulateServiceList.pm t/app/controller/report_new.t t/app/controller/rss.t templates/web/bromley/report/display.html templates/web/default/admin/council_contacts.html templates/web/default/common_header_tags.html templates/web/default/dashboard/index.html templates/web/default/front/stats.html templates/web/default/report/_main.html templates/web/default/report/update-form.html templates/web/emptyhomes/index.html templates/web/emptyhomes/report/display.html templates/web/emptyhomes/report/new/councils_text_all.html templates/web/emptyhomes/reports/body.html templates/web/emptyhomes/reports/index.html templates/web/fixmystreet/report/new/fill_in_details_form.html templates/web/fixmystreet/report/update-form.html web/cobrands/fixmystreet/fixmystreet.js web/js/fixmystreet.js
| * Allow bodies to span multiple area IDs, and areas can be covered by more ↵Matthew Somerville2012-12-19-11/+12
| | | | | | | | than one body.