aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
Commit message (Collapse)AuthorAgeLines
* 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.
| * Rename a few more less important variables.Matthew Somerville2012-12-15-4/+4
| |
| * Rename council column to bodies_str, and all the related code.Matthew Somerville2012-12-15-10/+10
| |
| * Convert PopulateServiceList to use body IDs.Matthew Somerville2012-12-15-30/+30
| |
| * Remove unused Open311 GetUpdates code.Matthew Somerville2012-12-15-82/+0
| |
| * Rename area_id on Contacts table to body_id.Matthew Somerville2012-12-15-3/+3
| | | | | | | | Add foreign key constraint from contacts to body.
| * Rename 'open311conf' database table to 'body'.Matthew Somerville2012-12-15-2/+2
| |
* | don't do Open311 service discovery for departments in FixMyBarangay project ↵Dave Whiteland2013-01-29-1/+1
| | | | | | | | (yet)
* | tidy up hardcoded council (area) idsDave Whiteland2013-01-21-4/+5
| |
* | add Oxfordshire's non-standard endpoint for service request updatesDave Whiteland2013-01-21-0/+7
| |
* | Merge remote-tracking branch 'origin/master'Struan Donald2013-01-21-6/+8
|\ \
| * | use jurisdiction to identify external bodies for FixMyBarangay's status ↵Dave Whiteland2013-01-20-6/+8
| |/ | | | | | | updates coming from endpoints in devolved contacts
* | Merge branch 'bromley-new-statuses'Struan Donald2013-01-16-6/+26
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * be less restrictive about how open 311 status updates can change statesStruan Donald2012-11-09-7/+5
| | | | | | | | | | as logged in council users don't have the same restrictions also, fix open311 status name of unable to fix
| * simplfy state change code and also correct bugsStruan Donald2012-10-04-17/+27
| |
| * tidy up status names in DB, improve tests a littleStruan Donald2012-10-01-0/+2
| |
| * initial work to handle changed problem statesStruan Donald2012-08-31-2/+12
| |