diff options
-rw-r--r-- | README.md | 9 | ||||
-rwxr-xr-x | bin/update-send-questionnaire | 29 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 1 | ||||
-rw-r--r-- | perllib/Open311.pm | 6 | ||||
-rw-r--r-- | t/open311.t | 1 | ||||
-rw-r--r-- | templates/email/fixamingata/submit-brent.txt | 2 | ||||
-rw-r--r-- | templates/email/fixamingata/submit.txt | 2 | ||||
-rwxr-xr-x | templates/web/fixamingata/faq/faq-sv.html | 2 |
8 files changed, 48 insertions, 4 deletions
@@ -22,6 +22,15 @@ We've been working hard to make the FixMyStreet Platform easy to install and re-use in other countries - please see our site at <http://code.fixmystreet.com/> for help and documentation in installing the FixMyStreet Platform. +## Contribution Guidelines + +Whilst many contributions come as part of people setting up their own +installation for their area, we of course welcome stand-alone contributions as +well. The *Suitable for Volunteers* label in our GitHub issues hopefully labels +some potential tasks that might be suitable for that situation, though please +do search through the other issues to see if what you're after has been +suggested or discussed - or feel free to add your own issue if not. + ## Mobile apps We've extracted all of the mobile apps from this repository into the diff --git a/bin/update-send-questionnaire b/bin/update-send-questionnaire new file mode 100755 index 000000000..7a231b919 --- /dev/null +++ b/bin/update-send-questionnaire @@ -0,0 +1,29 @@ +#!/usr/bin/env perl + +=head1 DESCRIPTION + +Ad hoc script to update the send_questionnaire column on the +reports in cobrands that don't send questionnaires at all. + +=cut + +use strict; +use warnings; + +use FixMyStreet::App; + +my @cobrands; +foreach my $cobrand ( FixMyStreet::Cobrand->available_cobrand_classes() ) { + next unless $cobrand->{class}; + my $cls = $cobrand->{class}->new(); + push @cobrands, $cls->moniker if !$cls->send_questionnaires(); +} + +my $problems = FixMyStreet::App->model('DB::Problem')->search({ + cobrand => \@cobrands, + send_questionnaire => 1, +}); + +$problems->update( { + send_questionnaire => 0 +}); diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index a419e9cc1..bf9f171be 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -809,6 +809,7 @@ sub process_report : Private { $report->postcode( $params{pc} ); $report->latitude( $c->stash->{latitude} ); $report->longitude( $c->stash->{longitude} ); + $report->send_questionnaire( $c->cobrand->send_questionnaires() ); # set some simple bool values (note they get inverted) $report->anonymous( $params{may_show_name} ? 0 : 1 ); diff --git a/perllib/Open311.pm b/perllib/Open311.pm index c8289a442..4f9b948ce 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -173,13 +173,17 @@ sub _generate_service_request_description { my $extra = shift; my $description = ""; - if ($problem->cobrand eq 'fixmystreet') { + if ($extra->{easting_northing}) { # Proxy for cobrand being in the UK $description .= "detail: " . $problem->detail . "\n\n"; $description .= "url: " . $extra->{url} . "\n\n"; $description .= "Submitted via FixMyStreet\n"; if ($self->extended_description ne 'oxfordshire') { $description = "title: " . $problem->title . "\n\n$description"; } + } elsif ($problem->cobrand eq 'fixamingata') { + $description .= "Beskrivning: " . $problem->detail . "\n\n"; + $description .= "Länk till ärendet: " . $extra->{url} . "\n\n"; + $description .= "Skickad via FixaMinGata\n"; } else { $description .= $problem->title . "\n\n"; $description .= $problem->detail . "\n\n"; diff --git a/t/open311.t b/t/open311.t index a029c7502..f23198ea5 100644 --- a/t/open311.t +++ b/t/open311.t @@ -70,6 +70,7 @@ my $problem = FixMyStreet::App->model('DB::Problem')->new( { subtest 'posting service request' => sub { my $extra = { url => 'http://example.com/report/1', + easting_northing => 'SET', }; my $results = make_service_req( $problem, $extra, $problem->category, '<?xml version="1.0" encoding="utf-8"?><service_requests><request><service_request_id>248</service_request_id></request></service_requests>' ); diff --git a/templates/email/fixamingata/submit-brent.txt b/templates/email/fixamingata/submit-brent.txt index c94e6e1e4..75a954765 100644 --- a/templates/email/fixamingata/submit-brent.txt +++ b/templates/email/fixamingata/submit-brent.txt @@ -1,6 +1,6 @@ Subject: FMS Problem Report: <?=$values['title']?> -Dear <?=$values['councils_name']?>, +Dear <?=$values['bodies_name']?>, <?=$values['missing']?><?=$values['multiple']?>A user of FixMyStreet has submitted the following report diff --git a/templates/email/fixamingata/submit.txt b/templates/email/fixamingata/submit.txt index 1fd9b8d25..547099ba6 100644 --- a/templates/email/fixamingata/submit.txt +++ b/templates/email/fixamingata/submit.txt @@ -1,6 +1,6 @@ Subject: Ny rapport: <?=$values['title']?> -Till <?=$values['councils_name']?>, +Till <?=$values['bodies_name']?>, Det här meddelandet rör en rapport om ett problem i gatumiljön som en medborgare lämnat via tjänsten Fixa Min Gata. diff --git a/templates/web/fixamingata/faq/faq-sv.html b/templates/web/fixamingata/faq/faq-sv.html index 897a6f4e5..c21b3b45a 100755 --- a/templates/web/fixamingata/faq/faq-sv.html +++ b/templates/web/fixamingata/faq/faq-sv.html @@ -106,7 +106,7 @@ landsting i Sambruk. Tjänsten togs fram i samarbete med <a href="http://kivos.s <dt>Finns källkoden tillgänglig?</dt> <dd> Programvaran bakom den här tjänsten är öppen programvara och tillgänglig -under Affero GPL (AGPL). Du kan <a href="http://github.com/MorusAB/fixmystreet">ladda ner</a> källkoden och hjälpa oss utveckla den. Du är också välkommen att använda den i dina egna projekt! +under Affero GPL (AGPL). Du kan <a href="http://github.com/mysociety/fixmystreet">ladda ner</a> källkoden och hjälpa oss utveckla den. Du är också välkommen att använda den i dina egna projekt! </dd> </dl> <h2><a name="pul"></a>Personuppgiftsombud</h2> |