diff options
author | Marius Halden <marius.h@lden.org> | 2021-10-07 13:32:40 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2021-10-07 13:32:40 +0200 |
commit | 09dacfc6b8bf62addeee16c20b1d90c2a256da96 (patch) | |
tree | 7caa2bf9e92227ab74448f9b746dd28bbcb81b2a /bin/fixmystreet.com/fixture | |
parent | 585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff) | |
parent | cea89fb87a96943708a1db0f646492fbfaaf000f (diff) |
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to 'bin/fixmystreet.com/fixture')
-rwxr-xr-x | bin/fixmystreet.com/fixture | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/bin/fixmystreet.com/fixture b/bin/fixmystreet.com/fixture index 1062eb16b..59de8e222 100755 --- a/bin/fixmystreet.com/fixture +++ b/bin/fixmystreet.com/fixture @@ -99,15 +99,35 @@ if ($opt->test_fixtures) { { area_id => 2257, categories => ['Flytipping', 'Graffiti'], name => 'Chiltern District Council' }, { area_id => 2397, categories => [ 'Graffiti' ], name => 'Northampton Borough Council' }, { area_id => 2483, categories => [ 'Potholes', 'Other' ], name => 'Hounslow Borough Council' }, + { area_id => 2508, categories => [ 'Potholes', 'Other' ], name => 'Hackney Council' }, { area_id => 2636, categories => [ 'Potholes', 'Private', 'Extra' ], name => 'Isle of Wight Council' }, - { area_id => 2566, categories => [ 'Fallen branch' ], name => 'Peterborough City Council' }, + { area_id => 2566, categories => [ 'Fallen branch', 'Light Out', 'Light Dim', 'Fallen Tree', 'Damaged Tree' ], name => 'Peterborough City Council' }, { area_id => 2498, categories => [ 'Incorrect timetable', 'Glass broken', 'Mobile Crane Operation' ], name => 'TfL' }, + { area_id => 2237, categories => [ 'Flytipping', 'Roads', 'Parks' ], name => 'Oxfordshire County Council' }, ) { $bodies->{$_->{area_id}} = FixMyStreet::DB::Factory::Body->find_or_create($_); my $cats = join(', ', @{$_->{categories}}); say "Created body $_->{name} for MapIt area ID $_->{area_id}, categories $cats"; } + for my $cat_name ('Fallen Tree', 'Damaged Tree') { + my $cat = FixMyStreet::DB->resultset('Contact')->find({ + body => $bodies->{2566}, + category => $cat_name, + }); + $cat->set_extra_metadata( group => 'Trees' ); + $cat->update; + } + + for my $cat_name ('Light Out', 'Light Dim') { + my $cat = FixMyStreet::DB->resultset('Contact')->find({ + body => $bodies->{2566}, + category => $cat_name, + }); + $cat->set_extra_metadata( group => 'Street lighting' ); + $cat->update; + } + my $child_cat = FixMyStreet::DB->resultset("Contact")->find({ body => $bodies->{2234}, category => 'Very Urgent', @@ -260,6 +280,7 @@ $priority->add_to_contacts($body->contacts->first); say "Created users, all with password 'password':"; my %users; my $perms_inspector = ['report_inspect', 'planned_reports']; +my $perms_inspector_with_instruct = [@$perms_inspector, 'report_instruct']; my $perms_cs = [ 'contribute_as_body', 'contribute_as_another_user', 'moderate', 'view_body_contribute_details', @@ -271,6 +292,7 @@ my $perms_cs_full = [ ]; foreach ( { name => 'Inspector Gadget', email => 'inspector@example.org', email_verified => 1, body => $body, permissions => $perms_inspector }, + { name => 'Inspector Instructor', email => 'inspector-instructor@example.org', email_verified => 1, body => $body, permissions => $perms_inspector_with_instruct }, { name => 'Harriet Helpful', email_verified => 1, email => 'cs@example.org', body => $body, permissions => $perms_cs }, { name => 'Andrew Agreeable', email_verified => 1, email => 'cs_full@example.org', body => $body, permissions => $perms_cs_full }, { name => 'Super User', email_verified => 1, email => 'super@example.org', body => $body, permissions => [ |