aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/Open311
Commit message (Collapse)AuthorAgeLines
* 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
| |
* | do not fall over if there is unexpectedly no meta data for a service codeStruan Donald2012-11-23-0/+8
| |
* | correct typo in special casing bromley service request updates endpointStruan Donald2012-11-21-1/+1
| |
* | slightly more useful error messages if fetching Open311 service request ↵Struan Donald2012-11-21-1/+1
| | | | | | | | updates fails
* | Merge branch 'stevenage'Struan Donald2012-11-19-0/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bin/make_css conf/crontab.ugly perllib/FixMyStreet/Cobrand/Default.pm perllib/Open311.pm templates/web/fixmystreet/around/postcode_form.html
| * | handle updates to meta data as well as meta data when a contact is createdStruan Donald2012-10-18-0/+6
| | |
| * | add script to fetch last 24 hours of updates as a backup and default to last ↵Struan Donald2012-10-17-0/+8
| | | | | | | | | | | | 2 hours in standard script
| * | bring service request updates in line with our specStruan Donald2012-10-08-0/+7
| | |
| * | Always use 'reopened', and don't set mark_open for Open311 received updates.Matthew Somerville2012-09-05-1/+0
| | |
| * | handle re-opening of problems via open311 service requests updates correctlyStruan Donald2012-09-05-0/+1
| |/ | | | | | | also small tweaks to display of update meta information
* | More cron quietening, only show full Open311 first time, then summarise.Matthew Somerville2012-10-05-1/+3
| |
* | Improve error message.Matthew Somerville2012-10-04-1/+2
| |