aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2015-03-13 18:06:55 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-03-13 21:54:29 +0000
commitd0a16157fbd10f8bdf1a07c77331504c61bf7f5d (patch)
treef0401ba3397536b02a0d63eafdec4c8fda4bcf38
parent76e533bd318cb4208faa1bf5cd0c00bde9e08e6c (diff)
[fixmystreet.com] Remove special Report-It code.
-rw-r--r--conf/general.yml-example8
-rw-r--r--data/dft.csv534
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm3
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm22
-rw-r--r--perllib/FixMyStreet/Cobrand/UK.pm1
-rw-r--r--perllib/FixMyStreet/SendReport/London.pm113
-rw-r--r--perllib/Utils.pm29
-rw-r--r--t/app/controller/report_import.t12
-rw-r--r--t/app/controller/report_new.t5
-rw-r--r--t/cobrand/get_body_sender.t3
-rw-r--r--templates/web/base/report/new/councils_text_all.html9
-rw-r--r--templates/web/fixmystreet-uk-councils/static/privacy.html4
-rwxr-xr-xtemplates/web/fixmystreet.com/faq/faq-en-gb.html4
-rwxr-xr-xtemplates/web/fixmystreet.com/static/privacy.html4
14 files changed, 22 insertions, 729 deletions
diff --git a/conf/general.yml-example b/conf/general.yml-example
index ec053d86d..ee68b5cd6 100644
--- a/conf/general.yml-example
+++ b/conf/general.yml-example
@@ -186,11 +186,3 @@ TESTING_COUNCILS: ''
# if you're using Message Manager, include the URL here (see https://github.com/mysociety/message-manager/)
MESSAGE_MANAGER_URL: ''
-
-# -----------------------------------------------------------------------
-
-# fixmystreet.com specific config variables. You won't need any of these.
-KASABI_API_KEY: ''
-LONDON_REPORTIT_URL: ''
-LONDON_REPORTIT_KEY: ''
-LONDON_REPORTIT_SECRET: ''
diff --git a/data/dft.csv b/data/dft.csv
deleted file mode 100644
index 0bf1a94d1..000000000
--- a/data/dft.csv
+++ /dev/null
@@ -1,534 +0,0 @@
-Id,Organisation
-7249,186k Limited
-7246,360 Networks(UK)Ltd
-7263,51ยบ Limited
-6905,Aberconwy And Colwyn
-7235,Abovenet Communications UK Ltd
-7082,Affiniti
-7297,Airwave Solutions Limited
-7302,Aligned Assets Limited
-905,Allerdale Borough Council
-6983,Amey Highways South East Unit
-6982,Amey Highways South West Unit
-7025,Andover Cable Services
-6805,Anglesey
-7026,Anglia Cable
-9100,Anglian Water
-7303,Ask Controls Ltd
-7300,Autodesk Ltd
-17,Baa
-5060,Barking And Dagenham
-5090,Barnet
-4405,Barnsley
-114,Bath And North East Somerset
-7045,Bcm North And East
-7043,Bcm South
-6980,Bear Scotland Ltd North East Unit
-6981,Bear Scotland Ltd North West Unit
-235,Bedford UA
-225,Bedfordshire
-7095,Bell Cablemedia (Wearside)
-7096,Bell Cablemedia (Worcester)
-5120,Bexley
-4605,Birmingham
-7028,Birmingham Cable
-7198,Birmingham Cable (Wythall)
-2372,Blackburn
-2373,Blackpool
-6910,Blaenau Gwent
-4205,Bolton
-1250,Bournemouth
-9110,Bournemouth And West Hampshire Water
-335,Bracknell Forest
-4705,Bradford
-5150,Brent
-6915,Bridgend
-1445,Brighton And Hove
-116,Bristol
-9111,Bristol Waterworks Company
-7242,British Gas Connections Ltd
-7186,British Oxygen
-7089,British Pipeline Agency (Bpa)
-7094,British Rail Telecomms
-7187,British Waterways Board
-7208,Broadband Ventures
-7172,Broadcast Satellite Television
-7029,Broadland Cablevision
-5180,Bromley
-7225,Bskyb Telecommunications Services Ltd
-30,BT
-7171,BT New Towns System
-430,Buckinghamshire
-7192,Burton-Upon-Trent Cable Comms
-4210,Bury
-7298,By Design
-7319,C2c Services Ltd
-70,Cable & Wireless UK
-7097,Cable Commmunications Fylde & Wyre
-7030,Cable London Plc (Camden)
-7099,Cable London Plc (Enfield)
-7100,Cable London Plc (Hackney)
-7101,Cable London Plc (Haringey)
-7103,Cable North West (Central Lancashire)
-7052,Cable North West (Merseyside)
-7102,Cable North West (North Liverpool)
-7104,Cable North West (St Helens)
-7105,Cable North West (Wigan)
-7173,Cablecom Investments
-7032,Cabletel Bedfordshire
-7106,Cabletel Central Hertfordshire
-7107,Cabletel Hertfordshire
-7047,Cabletel Kirklees
-7108,Cabletel North Bedfordshire
-7109,Cabletel South Wales (Cardiff)
-7050,Cabletel South Wales (Newport)
-7110,Cabletel South Wales (West Glamorgan)
-7111,Cabletel Surrey
-7033,Cablevision Wellingborough
-7296,Cadcorp
-6810,Caernarfonshire And Merionethshire
-6920,Caerphilly
-4710,Calderdale
-7034,Cambridge Cable
-9113,Cambridge Water Company
-535,Cambridgeshire
-5210,Camden
-6815,Cardiff
-6820,Cardiganshire
-6825,Carmarthenshire
-7253,Carrier 1 UK Ltd
-240,Central Bedfordshire UA
-7007,Central Networks
-7011,Central Networks
-9234,Centro
-645,Cheshire
-660,Cheshire East UA
-665,Cheshire West And Chester UA
-9114,Chester Waterworks
-9115,Cholderton And District Water
-1055,City Of Derby
-2465,City Of Leicester
-5030,City Of London
-7075,City Of London Telecomms
-3060,City Of Nottingham
-540,City Of Peterborough
-1160,City Of Plymouth
-1775,City Of Portsmouth
-1780,City Of Southampton
-3455,City Of Stoke-On-Trent
-5990,City Of Westminster
-7261,Citylink Telecommunications Ltd
-7279,Cityspace Ltd
-7112,Comcast Teesside (Darlington)
-7113,Comcast Teesside (Teesside)
-7035,Comment Cablevision
-7058,Comtel (Stafford Comms )
-800,Cornwall
-840,Cornwall UA
-7036,County Cable Comms
-1850,County Of Herefordshire
-4610,Coventry
-7037,Coventry Cable
-7318,Crossrail Ltd
-5240,Croydon
-900,Cumbria
-1350,Darlington
-7290,Dclg Firecontrol Project
-9138,Dee Valley Water Plc
-4900,Defence Estates
-6830,Denbighshire
-7188,Department For Transport Stats Roads
-1050,Derbyshire
-1155,Devon
-7189,Diamond Cable (Bassetlaw And Ravenshead
-7040,Diamond Cable (Grantham)
-7114,Diamond Cable (Grimsby)
-7115,Diamond Cable (Lincoln)
-7203,Diamond Cable (Lincolnshire)
-7116,Diamond Cable (Mansfield)
-7117,Diamond Cable (Melton Mowbray)
-7118,Diamond Cable (Newark)
-7119,Diamond Cable (Nottingham)
-4410,Doncaster
-1245,Dorset
-4615,Dudley
-1345,Durham
-1355,Durham UA
-7260,E S Pipelines Ltd
-5270,Ealing
-7042,East Coast Cable
-2001,East Riding Of Yorkshire
-1440,East Sussex
-7219,Eastern Group Telecoms
-7259,Eigernet Ltd
-7243,Eircom (UK) Ltd
-7325,Eirgrid Plc
-7005,Electricity North West Limited
-7120,Encom Cable TV & Comms (Dartford)
-7121,Encom Cable TV & Comms (Epping Forest)
-7122,Encom Cable TV & Comms (Greater London)
-7123,Encom Cable TV & Comms (Havering)
-7124,Encom Cable TV & Comms (Newham)
-7125,Encom Cable TV & Comms (Waltham Forest)
-7269,Energetics Electricity Limited
-7311,Energetics Gas Limited
-7080,Energis Comms
-5300,Enfield
-7220,Environment Agency
-7309,Esp Electricity Limited
-1585,Essex
-9120,Essex And Suffolk Water
-7091,Esso Petroleum Co
-7307,Eunetworks Fiber UK Limited
-7039,Eurobell (South West)
-7044,Eurobell (Sussex)
-7126,Eurobell (West Kent)
-7282,Exor Corporation Ltd
-7127,Fenland Cablevision
-7223,Fibernet Ltd
-7266,Fibrespan Limited
-7305,Fibrespeed Ltd
-7206,Fina Pipelines
-6835,Flintshire
-7234,Flute Ltd
-7294,Fulcrum Pipelines Limited
-7241,Gamma Telecom Ltd
-7231,Gas Transportation Co Ltd
-4505,Gateshead
-7229,GC Pan European Crossing UK Ltd
-7315,Gene Sys Telecommunications Ltd
-7237,General Telecommunications Ltd
-7304,Geo
-7317,Ggp Systems Ltd
-7084,Global Communications Holding Ltd
-7183,Global Crossing (UK) Telecommunications
-1600,Gloucestershire
-7207,Government Office (London)
-7215,Greater Manchester PTE
-3061,Greater Nottingham Light Rapid Transit
-5330,Greenwich
-7228,GT UK Ltd
-7312,H2O Networks
-5360,Hackney
-7262,Halcrow Group
-650,Halton
-5390,Hammersmith And Fulham
-1770,Hampshire
-5420,Haringey
-5450,Harrow
-724,Hartlepool
-9122,Hartlepool Water
-5480,Havering
-1900,Hertfordshire
-7323,Highway Management Scotland Ltd
-11,Highways Agency
-5510,Hillingdon
-7193,Hincley Cable Comms
-7285,Historic Scotland
-9997,Holeworld Ltd
-5540,Hounslow
-7077,Hutchinson Microtel
-7264,Hutchison 3g Ltd
-7245,I-21 Holdings Ltd
-7185,ICI Pipelines
-7306,Idox Software Ltd
-7218,Independent Pipelines Ltd
-7281,Independent Power Networks Ltd
-7326,Independent Water Networks Ltd
-60,Infocus Public Networks Ltd
-7291,Innogistic Software Plc
-7324,Internal Communication Systems Ltd
-7074,Ionica L3
-2114,Isle Of Wight
-7251,Isle Of Wight Cable And Telephone Co Ltd
-835,Isles Of Scilly
-5570,Islington
-7289,Jacobs UK Ltd
-7174,John Jones
-7175,John Sulwyn Evans
-7128,Jones Cable Group (Harrogate)
-7067,Jones Cable Group (York)
-7129,Jones Cable Group Of Leeds
-7130,Jones Cable Group South Hertfordshire
-5600,Kensington And Chelsea
-2275,Kent
-9924,Kent Fire And Rescue Service
-7308,Key Traffic Systems Ltd
-7073,Kingston Comms (Hull)
-5630,Kingston Upon Thames
-2004,Kingston-Upon-Hull
-4715,Kirklees
-4305,Knowsley
-7267,Kpn Eurorings Bv
-7227,Kpn Telecom UK Ltd
-7268,Laing Energy Ltd
-5660,Lambeth
-2371,Lancashire
-7277,Lancaster University Network Services
-7048,Lcl Cable Comms
-4720,Leeds
-2460,Leicestershire
-7232,Level 3 Communications Ltd
-5690,Lewisham
-7191,Lichfield Cable Comms
-2500,Lincolnshire
-4310,Liverpool
-7216,London Dockland Development Corp
-7009,London Electricity
-7210,London Transport
-7072,London Underground
-7320,Luns Ltd
-230,Luton
-7283,M6 Concessionaire
-18,M6 Toll Motorway (Mel)
-7284,M77 Concessionaire
-7090,Mainline Pipelines
-4215,Manchester
-7008,Manweb
-7295,Mapinfo Ltd
-7288,Mayrise Limited
-2280,Medway Towns
-50,Mercury
-7078,Mercury Pcn
-9212,Merseyside Fire Service
-6925,Merthyr Tydfil
-5720,Merton
-7176,Metro Cable TV
-9123,Mid Kent Water
-9124,Mid Southern Water
-13,Mid Wales Trunk Road Agency
-734,Middlesborough
-7049,Middlesex Cable Comms
-7238,Middlesex Cable Ltd
-7031,Midland Cable Comms
-435,Milton Keynes
-7278,Mll Telecom Limited
-6840,Monmouthshire
-7257,Mowlem Energy Limited
-7177,Multichannel Television
-7015,National Grid Electricity Transmission
-10,National Grid Gas Plc
-7217,National Transcommunications Ltd
-6930,Neath And Port Talbot
-7244,Neoscorp Ltd
-7093,Network Rail Infrastructure Ltd
-7226,New World Payphones Ltd
-4510,Newcastle Upon Tyne
-5750,Newham
-7275,Newnet Plc
-6935,Newport
-2600,Norfolk
-7293,Norfolk Fire And Rescue Service
-7051,North Downs Cable
-2002,North East Lincolnshire
-9126,North East Water
-2003,North Lincolnshire
-9127,North Surrey Water
-4515,North Tyneside
-14,North Wales Trunk Road Agency
-121,North West Somerset
-9102,North West Water
-2745,North Yorkshire
-2800,Northamptonshire
-7006,Northern Electric
-7271,Northern Gas Networks
-2900,Northumberland
-2935,Northumberland UA
-9101,Northumbrian Water
-7053,Norwich Cablevision
-7222,Nottingham City Heating
-3055,Nottinghamshire
-7274,Ntl National Networks Ltd
-7142,Nynex Cablecomms
-7182,O2 (UK) Limited
-7092,Oil And Pipeline Agency (Gpss)
-4220,Oldham
-7321,Olympic Delivery Authority
-7258,Omne Telecommunications Ltd
-7252,Oncue Telecommunications Ltd
-7299,Opal Telecom
-7233,Orange Pcs Ltd
-7055,Oxford Cable
-3100,Oxfordshire
-6845,Pembrokeshire
-7056,Peterborough Cablevision
-7301,Plantech Limited
-1255,Poole
-7213,Port Of London Authority
-9128,Portsmouth Waterworks Company
-7316,Powersystems UK Ltd
-6850,Powys
-345,Reading
-5780,Redbridge
-728,Redcar And Cleveland
-7247,Redstone Network Services Ltd
-6940,Rhondda Cynon Taff
-5810,Richmond Upon Thames
-4225,Rochdale
-7322,Rolta UK Limited
-7221,Romec Ltd
-4415,Rotherham
-7214,Royal Parks
-7184,Rugby Cement
-2470,Rutland
-4230,Salford
-7179,Salford Cable Television
-4620,Sandwell
-7180,Sapphire
-7273,Scotland Gas Networks Plc
-7079,Scottish Hydro-Electric (Comms)
-7286,Scottish Natural Heritage
-7019,Scottish Power
-7287,Scottish Wildlife Trust
-4320,Sefton
-9103,Severn Trent Water
-4420,Sheffield
-7209,Sheffield Heat And Power
-7070,Shell / BP Pipelines
-3235,Shropshire
-9922,Shropshire Fire And Rescue Service
-3245,Shropshire UA
-350,Slough
-7211,Slough Heat And Power
-4625,Solihull
-3300,Somerset
-9117,South East Water
-119,South Gloucestershire
-9129,South Staffordshire Water
-4520,South Tyneside
-7012,South Wales Electricity
-7292,South Wales Fire And Rescue Service
-12,South Wales Trunk Road Agency
-9105,South West Water
-7003,South Western Electricity
-9923,South Yorkshire Fire And Rescue Service
-9236,South Yorkshire PTE
-1590,Southend-On-Sea
-7194,Southern East Anglia Cable
-7002,Southern Electric
-7270,Southern Gas Networks Plc
-9104,Southern Water
-5840,Southwark
-7313,Sse Pipelines Ltd
-4315,St Helens
-3450,Staffordshire
-7059,Starvision Network
-4235,Stockport
-738,Stockton-On-Tees
-9998,Street Managers Without A Specific Code
-9999,Street Work Licences
-3500,Suffolk
-4525,Sunderland
-3600,Surrey
-5870,Sutton
-9118,Sutton And East Surrey Water Plc
-9131,Sutton District Water No Longer Operates
-6855,Swansea
-7145,Sweb Telecoms
-3935,Swindon
-7060,Swindon Cable
-7280,Symology
-4240,Tameside
-7190,Tamworth Cable Comms
-7181,Tawd Valley Cable
-7016,Teeside Power
-7147,Telecential Comms (Northampton)
-7150,Telecential Comms (Rugby)
-7151,Telecential Comms (Stratford)
-7146,Telecential Comms Northants
-7148,Telecential Comms Thames Valley
-7149,Telecential Comms Warwickshire
-7152,Telecential Comms West Hertfordshire
-7240,Telewest Communications Group
-3240,Telford And Wrekin
-7153,Telford Telecomms
-7230,Telia UK Ltd
-7085,Telstra European Holdings
-9106,Thames Water
-7098,The Cable Corporation (Hillingdon)
-7066,The Cable Corporation (Windsor)
-1595,Thurrock
-7224,Thus
-7250,T-Mobile (UK)Limited
-1165,Torbay
-6945,Torfaen
-5900,Tower Hamlets
-7212,Traffic Director For London
-4245,Trafford
-20,Transport For London
-7087,Transport For London Street Management
-7010,UK Power Networks Eastern & London
-7004,UK Power Networks South Eastern
-7061,United Artists Comms (Avon)
-7154,United Artists Comms (Cotswolds)
-7156,United Artists Comms (Kingston)
-7155,United Artists Comms (London South)
-7157,United Artists Comms (Merton)
-7158,United Artists Comms (North East)
-7159,United Artists Comms (South East)
-7255,United Utilities Gas Networks Ltd
-7256,United Utilities Gas Pipelines Ltd
-7265,Utility Grid Installations Ltd
-6950,Vale Of Glamorgan
-9133,Veolia Water Central Ltd
-9132,Veolia Water East Ltd
-7314,Veolia Water Outsoursing Limited
-9121,Veolia Water Southeast
-7086,Verizon Business
-7236,Viatel UK Ltd
-7062,Videotron Corporation (Ealing)
-7161,Videotron Corporation (Greenwich)
-7162,Videotron Corporation (Hammersmith)
-7163,Videotron Corporation (Harrow)
-7164,Videotron Corporation (Kensington)
-7165,Videotron Corporation (Lamberth)
-7166,Videotron Corporation (Southampton)
-7167,Videotron Corporation (Thamesmead)
-7168,Videotron Corporation (Wandsworth)
-7169,Videotron Corporation (Winchester)
-7205,Videotron Southampton (Totton And Hythe)
-7160,Virgin Media
-7076,Vodafone Group
-7248,Vsnl Telecommunications (UK) Ltd
-7254,Vtesse Networks
-7276,Vtl (UK) Ltd
-4725,Wakefield
-7272,Wales & West Utilities Ltd
-4630,Walsall
-5930,Waltham Forest
-5960,Wandsworth
-655,Warrington
-3700,Warwickshire
-16,Welsh Assembly Government
-7310,Welsh Highland Railway Construction Ltd
-9107,Welsh Water
-7064,Wessex Cable
-9108,Wessex Water
-340,West Berkshire
-9137,West Of Scotland Water
-3800,West Sussex
-9235,West Yorkshire PTE
-7065,Westminster Cable Company
-4250,Wigan
-3930,Wiltshire
-3940,Wiltshire UA
-355,Windsor And Maidenhead
-7239,Windsor Television Ltd
-4325,Wirral
-360,Wokingham
-4635,Wolverhampton
-1855,Worcestershire
-7081,Worldcom International Ltd
-6955,Wrexham
-9135,Wrexham Water
-2741,York
-9136,York Waterworks
-7027,Yorkshire Cable Comms
-7068,Yorkshire Cable Comms (Bradford)
-7041,Yorkshire Cable Comms (Doncaster)
-7170,Yorkshire Cable Comms (Halifax)
-7057,Yorkshire Cable Comms (Sheffield)
-7063,Yorkshire Cable Comms (Wakefield)
-7001,Yorkshire Electricity Distribution Ltd
-9109,Yorkshire Water
-7083,Your Communications Limited
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index de13a76de..790e22e8c 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -266,9 +266,6 @@ sub bodies : Path('bodies') : Args(0) {
$c->forward( 'fetch_all_bodies' );
- # XXX For fixmystreet.com, need to exclude bodies that are covering London.
- # But soon, this means just don't have bodies covering London.
-
my $contacts = $c->model('DB::Contact')->search(
undef,
{
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 5021d90e0..ee643a03a 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -74,7 +74,6 @@ partial
=cut
-use constant COUNCIL_ID_BARNET => 2489;
use constant COUNCIL_ID_BROMLEY => 2482;
sub report_new : Path : Args(0) {
@@ -624,18 +623,6 @@ sub setup_categories_and_bodies : Private {
_('Empty public building - school, hospital, etc.')
);
- } elsif ($first_area->{id} != COUNCIL_ID_BROMLEY
- && $first_area->{id} != COUNCIL_ID_BARNET
- && $first_area->{type} eq 'LBO') {
-
- $bodies_to_list{ $first_body->id } = 1;
- my @local_categories;
- @local_categories = sort keys %{ Utils::london_categories() };
- @category_options = (
- _('-- Pick a category --'),
- @local_categories
- );
-
} else {
# keysort does not appear to obey locale so use strcoll (see i18n.t)
@@ -851,15 +838,6 @@ sub process_report : Private {
$report->extra( \%extra );
}
- } elsif ($first_area->{id} != COUNCIL_ID_BROMLEY
- && $first_area->{id} != COUNCIL_ID_BARNET
- && $first_area->{type} eq 'LBO') {
-
- unless ( Utils::london_categories()->{ $report->category } ) {
- $c->stash->{field_errors}->{category} = _('Please choose a category');
- }
- $report->bodies_str( $first_body->id );
-
} elsif ( $report->category ) {
# FIXME All contacts were fetched in setup_categories_and_bodies,
diff --git a/perllib/FixMyStreet/Cobrand/UK.pm b/perllib/FixMyStreet/Cobrand/UK.pm
index 786b6038c..33d3b4253 100644
--- a/perllib/FixMyStreet/Cobrand/UK.pm
+++ b/perllib/FixMyStreet/Cobrand/UK.pm
@@ -31,7 +31,6 @@ sub _fallback_body_sender {
my $first_area = $body->body_areas->first->area_id;
my $area_info = mySociety::MaPit::call('area', $first_area);
- return { method => 'London' } if $area_info->{type} eq 'LBO';
return { method => 'NI' } if $area_info->{type} eq 'LGD';
return { method => 'Email' };
}
diff --git a/perllib/FixMyStreet/SendReport/London.pm b/perllib/FixMyStreet/SendReport/London.pm
deleted file mode 100644
index 2a1ebc1c3..000000000
--- a/perllib/FixMyStreet/SendReport/London.pm
+++ /dev/null
@@ -1,113 +0,0 @@
-package FixMyStreet::SendReport::London;
-
-use Moose;
-
-BEGIN { extends 'FixMyStreet::SendReport'; }
-
-use Digest::MD5;
-use FindBin;
-use LWP::UserAgent;
-use LWP::Simple;
-
-use Utils;
-
-sub construct_message {
- my %h = @_;
- return <<EOF,
-A user of FixMyStreet has submitted the following report of a local
-problem that they believe might require your attention.
-
-Subject: $h{title}
-
-Details: $h{detail}
-
-$h{fuzzy}, or to provide an update on the problem, please visit the
-following link:
-
-$h{url}
-
-$h{closest_address}
-Yours,
-The FixMyStreet team
-EOF
-}
-
-sub send {
- return if mySociety::Config::get('STAGING_SITE');
- my ( $self, $row, $h ) = @_;
-
- $h->{message} = construct_message( %$h );
- my $phone = $h->{phone};
- my $mobile = '';
- if ($phone && $phone =~ /^\s*07/) {
- $mobile = $phone;
- $phone = '';
- }
- my ($first, $last) = $h->{name} =~ /^(\S*)(?: (.*))?$/;
- my %params = (
- Key => mySociety::Config::get('LONDON_REPORTIT_KEY'),
- Signature => Digest::MD5::md5_hex( $h->{confirmed} . mySociety::Config::get('LONDON_REPORTIT_SECRET') ),
- Type => Utils::london_categories()->{$h->{category}},
- RequestDate => $h->{confirmed},
- RequestMethod => 'Web',
- ExternalId => $h->{url},
- 'Customer.Title' => '',
- 'Customer.FirstName' => $first,
- 'Customer.Surname' => $last,
- 'Customer.Email' => $h->{email},
- 'Customer.Phone' => $phone,
- 'Customer.Mobile' => $mobile,
- 'ProblemDescription' => $h->{message},
- );
- if ($h->{used_map}) {
- $params{'Location.Latitude'} = $h->{latitude};
- $params{'Location.Longitude'} = $h->{longitude};
- } elsif (mySociety::PostcodeUtil::is_valid_postcode($h->{query})) {
- # Didn't use map, and entered postcode, so use that.
- $params{'Location.Postcode'} = $h->{query};
- } else {
- # Otherwise, lat/lon is all we have, even if it's wrong.
- $params{'Location.Latitude'} = $h->{latitude};
- $params{'Location.Longitude'} = $h->{longitude};
- }
- if ($h->{has_photo}) {
- $params{'Document1.Name'} = 'Photograph';
- $params{'Document1.MimeType'} = 'image/jpeg';
- $params{'Document1.URL'} = $h->{image_url};
- $params{'Document1.URLPublic'} = 'true';
- }
- my $browser = LWP::UserAgent->new;
- my $response = $browser->post( mySociety::Config::get('LONDON_REPORTIT_URL'), \%params );
- my $out = $response->content;
- if ($response->code ne 200) {
- $self->error( "Failed to post $h->{id} to London API, response was " . $response->code . " $out" );
- return 1;
- }
- my ($id) = $out =~ /<caseid>(.*?)<\/caseid>/;
- my ($org) = $out =~ /<organisation>(.*?)<\/organisation>/;
- my ($team) = $out =~ /<team>(.*?)<\/team>/;
-
- $org = london_lookup($org);
- $row->external_id( $id );
- $row->external_body( $org );
- $row->external_team( $team );
- $self->success(1);
- return 0;
-}
-
-sub london_lookup {
- my $org = shift || '';
- my $str = "Unknown ($org)";
- open(FP, "$FindBin::Bin/../data/dft.csv");
- while (<FP>) {
- /^(.*?),(.*)/;
- if ($org eq $1) {
- $str = $2;
- last;
- }
- }
- close FP;
- return $str;
-}
-
-1;
diff --git a/perllib/Utils.pm b/perllib/Utils.pm
index 243b98800..21a7311f2 100644
--- a/perllib/Utils.pm
+++ b/perllib/Utils.pm
@@ -91,35 +91,6 @@ sub truncate_coordinate {
return $out;
}
-sub london_categories {
- return {
- 'Abandoned vehicle' => 'AbandonedVehicle',
- 'Car parking' => 'Parking',
- 'Dangerous structure' => 'DangerousStructure',
- 'Dead animal' => 'DeadAnimal',
- 'Dumped cylinder' => 'DumpedCylinder',
- 'Dumped rubbish' => 'DumpedRubbish',
- 'Flyposting' => 'FlyPosting',
- 'Graffiti' => 'Graffiti',
- 'Litter bin' => 'LitterBin',
- 'Public toilet' => 'PublicToilet',
- 'Refuse collection' => 'RefuseCollection',
- 'Road or pavement defect' => 'Road',
- 'Road or pavement obstruction' => 'Obstruction',
- 'Skip problem' => 'Skip',
- 'Street cleaning' => 'StreetCleaning',
- 'Street drainage' => 'StreetDrainage',
- 'Street furniture' => 'StreetFurniture',
- 'Street needs gritting' => 'StreetGritting',
- 'Street lighting' => 'StreetLighting',
- 'Street sign' => 'StreetSign',
- 'Traffic light' => 'TrafficLight',
- 'Tree (dangerous)' => 'DangerousTree',
- 'Tree (fallen branches)' => 'FallenTree',
- 'Untaxed vehicle' => 'UntaxedVehicle',
- };
-}
-
sub barnet_categories {
# The values here are KBIDs from Barnet's system: see bin/send-reports for formatting.
# They are no longer used since Barnet switched to email for delivery of problem reports.
diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t
index 0631b4209..ff6508149 100644
--- a/t/app/controller/report_import.t
+++ b/t/app/controller/report_import.t
@@ -17,7 +17,17 @@ ok -e $sample_file, "sample file $sample_file exists";
FixMyStreet::App->log->disable('info');
END { FixMyStreet::App->log->enable('info'); }
-$mech->create_body_ok(2504, 'Westminster City Council');
+my $body = $mech->create_body_ok(2504, 'Westminster City Council');
+$mech->create_contact_ok(
+ body_id => $body->id,
+ category => 'Street lighting',
+ email => 'streetlighting@example.com',
+);
+$mech->create_contact_ok(
+ body_id => $body->id,
+ category => 'Potholes',
+ email => 'highways@example.com',
+);
# submit an empty report to import - check we get all errors
subtest "Test creating bad partial entries" => sub {
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 761fdad30..25fa01a1f 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -88,6 +88,11 @@ my $contact7 = $mech->create_contact_ok(
category => 'Street lighting',
email => 'highways@example.com',
);
+my $contact8 = $mech->create_contact_ok(
+ body_id => $body_ids{2504},
+ category => 'Street lighting',
+ email => 'highways@example.com'
+);
# test that the various bit of form get filled in and errors correctly
# generated.
diff --git a/t/cobrand/get_body_sender.t b/t/cobrand/get_body_sender.t
index 964f5c0e4..a9ba49479 100644
--- a/t/cobrand/get_body_sender.t
+++ b/t/cobrand/get_body_sender.t
@@ -26,9 +26,8 @@ FixMyStreet::override_config {
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
is_deeply $c->get_body_sender( $body ), { method => 'Email' }, 'defaults to email';
-
$body_area->update({ area_id => 2481 }); # Croydon LBO
- is_deeply $c->get_body_sender( $body ), { method => 'London' }, 'returns london report it if London borough';
+ is_deeply $c->get_body_sender( $body ), { method => 'Email' }, 'still email if London borough';
};
$body->send_method( 'TestMethod' );
diff --git a/templates/web/base/report/new/councils_text_all.html b/templates/web/base/report/new/councils_text_all.html
index e9a008e90..5e5ad13a0 100644
--- a/templates/web/base/report/new/councils_text_all.html
+++ b/templates/web/base/report/new/councils_text_all.html
@@ -1,13 +1,6 @@
[%# XXX The below type checking is assuming that a body ID can be used to look up a mapit type. %]
<p>
-[% IF bodies_to_list.0 != 2489 && bodies_to_list.0 != 2482 && all_areas.${bodies_to_list.0}.type == 'LBO' %]
-[%
- tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'),
- all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' )
- );
-%]
-[% ELSIF all_areas.${bodies_to_list.0}.type == 'LGD' %]
+[% IF all_areas.${bodies_to_list.0}.type == 'LGD' %]
[%
tprintf(
loc('All the information you provide here will be sent to <strong>%s</strong> or <strong>Roads Service</strong>.'),
diff --git a/templates/web/fixmystreet-uk-councils/static/privacy.html b/templates/web/fixmystreet-uk-councils/static/privacy.html
index addce1e2d..ba1745978 100644
--- a/templates/web/fixmystreet-uk-councils/static/privacy.html
+++ b/templates/web/fixmystreet-uk-councils/static/privacy.html
@@ -32,9 +32,7 @@ other companies, you can adjust your usage or install opt-out browser plugins.
<dt>Who gets to see my email address?</dt>
<dd>If you submit a problem, we pass on your details, and details of
the problem, to the council contact or contacts responsible for the area where
-you located the problem, or other relevant body (for example, in most of London
-we send reports via the central London Report-It service, who may also publish
-the public details of your report). Other than the council, who obviously get
+you located the problem, or other relevant body. Other than the council, who obviously get
your email address, only people we authorise to view the FixMyStreet
administration interface will be able to see your email address and they will
never use it for anything other than to help administer FixMyStreet. Similarly
diff --git a/templates/web/fixmystreet.com/faq/faq-en-gb.html b/templates/web/fixmystreet.com/faq/faq-en-gb.html
index 92991fb0a..947576b38 100755
--- a/templates/web/fixmystreet.com/faq/faq-en-gb.html
+++ b/templates/web/fixmystreet.com/faq/faq-en-gb.html
@@ -261,8 +261,8 @@ category for your report. If your problem is very near a council boundary, it
is easy to place the pin on the wrong side of it by mistake. Similarly,
choosing the wrong category can mean that your report is sent to one council
when it should have gone to another.
-<p>At the moment, FixMyStreet does not send reports to the Highways Agency
-(except within London), but we are working on that.
+<p>At the moment, FixMyStreet does not send reports to the Highways Agency,
+but we are working on that.
<p>If the above two paragraphs do not apply, please <a href="/contact">drop us
a line</a> and we'll try to get to the bottom of why your report has been
misrouted. Please include the URL (web address) of your FixMyStreet report.
diff --git a/templates/web/fixmystreet.com/static/privacy.html b/templates/web/fixmystreet.com/static/privacy.html
index addce1e2d..ba1745978 100755
--- a/templates/web/fixmystreet.com/static/privacy.html
+++ b/templates/web/fixmystreet.com/static/privacy.html
@@ -32,9 +32,7 @@ other companies, you can adjust your usage or install opt-out browser plugins.
<dt>Who gets to see my email address?</dt>
<dd>If you submit a problem, we pass on your details, and details of
the problem, to the council contact or contacts responsible for the area where
-you located the problem, or other relevant body (for example, in most of London
-we send reports via the central London Report-It service, who may also publish
-the public details of your report). Other than the council, who obviously get
+you located the problem, or other relevant body. Other than the council, who obviously get
your email address, only people we authorise to view the FixMyStreet
administration interface will be able to see your email address and they will
never use it for anything other than to help administer FixMyStreet. Similarly