Skip to content

Commit

Permalink
Merge branch 'master' into commercial-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Dec 24, 2024
2 parents 28af28c + 6bc48d9 commit ea54bdb
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 35 deletions.
18 changes: 9 additions & 9 deletions locale/de_CH.UTF-8/LC_MESSAGES/FixMyStreet.po
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ msgstr ""
#: templates/web/base/around/display_location.html:62
#: templates/web/base/js/translation_strings.html:42
msgid "Choose location, pan and zoom to adjust"
msgstr ""
msgstr "Wähle den Ort, verschiebe und zoome um anzupassen"

#: templates/web/base/auth/create.html:71
#, fuzzy
Expand Down Expand Up @@ -1086,7 +1086,7 @@ msgstr ""
#: templates/web/base/report/new/form_report.html:46
#: templates/web/base/report/new/form_report.html:64
msgid "Continue"
msgstr ""
msgstr "Weiter"

#: templates/web/base/main_nav_items.html:34
#, fuzzy
Expand All @@ -1095,7 +1095,7 @@ msgstr "Erfasse eine Meldung"

#: templates/web/base/report/new/duplicate_suggestions.html:20
msgid "Continue – report a new problem"
msgstr ""
msgstr "Weiter - neues Problem melden"

#: templates/web/base/admin/bodies/open311-form-fields.html:151
msgid "Convert location from Easting/Northing"
Expand Down Expand Up @@ -1461,7 +1461,7 @@ msgstr "Meldungen editieren"
#. ("JS")
#: templates/web/base/js/translation_strings.html:75
msgid "Drag photos here or <u>browse photos</u>"
msgstr ""
msgstr "Fotos hierhin legen oder <u>Fotos suchen</u>"

#. ("JS")
#: templates/web/base/js/translation_strings.html:82
Expand Down Expand Up @@ -4389,13 +4389,13 @@ msgstr "Ausstehender Meldungsversand"

#: templates/web/base/report/new/after_photo.html:3
msgid "Reports with photos in them tend to get fixed more quickly"
msgstr ""
msgstr "Meldungen mit Fotos können schneller behoben werden"

#. ("JS")
#: templates/web/base/js/translation_strings.html:41
#: templates/web/base/report/new/fill_in_details.html:34
msgid "Reposition if needed, then hit Continue"
msgstr ""
msgstr "Neue Position setzen, falls nötig, dann Weiter"

#: templates/web/base/maps/_map_instructions.html:30
#, fuzzy
Expand Down Expand Up @@ -4991,7 +4991,7 @@ msgstr "Ältere Meldungen anzeigen"

#: templates/web/base/maps/_map_instructions.html:29
msgid "Start new report here"
msgstr ""
msgstr "Starte neue Meldung hier"

#: templates/web/base/admin/sitemessage/_ooh.html:45
msgid "Start time"
Expand Down Expand Up @@ -6517,7 +6517,7 @@ msgstr ""

#: templates/web/base/maps/_map_instructions.html:3
msgid "You can move around with your keyboard"
msgstr ""
msgstr "Sie können sich mit der Tastatur bewegen."

#: templates/web/fixmystreet.com/contact/who.html:60
msgid "You can only contact the team behind FixMyStreet using our contact form"
Expand Down Expand Up @@ -7250,4 +7250,4 @@ msgstr[1] ""
#~ msgstr "Gelöscht"

#~ msgid "Place pin on map"
#~ msgstr "Pin auf der Karte absetzen"
#~ msgstr "Pin auf der Karte absetzen"
32 changes: 15 additions & 17 deletions perllib/FixMyStreet/Cobrand/Bromley.pm
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ sub open311_config {

if ($contact->email =~ /^\d+$/) {
$params->{multi_photos} = 1;
}
my $group = $contact->get_extra_metadata('group') || '';
if ($group eq 'Waste') {
$params->{upload_files} = 1;
}

Expand Down Expand Up @@ -416,10 +413,10 @@ appropriately.

sub open311_get_update_munging {
my ($self, $comment, $state, $request) = @_;
my $problem = $comment->problem;

# An update from Bromley with a special referral state, means "resend to Echo"
if ($state eq 'referred to veolia streets') {
my $problem = $comment->problem;
# Do we want to store the old category somewhere for display?
$problem->category(REFERRED_TO_VEOLIA); # Will be an Echo Event Type ID
$problem->state('in progress');
Expand All @@ -434,23 +431,24 @@ sub open311_get_update_munging {

# Fetch any outgoing notes on the Echo event
# If we pulled the update, we already have it, otherwise look it up
my $event = $request->{echo_event} || do {
my $echo = $self->feature('echo');
$echo = Integrations::Echo->new(%$echo);
my $event = $echo->GetEvent($request->{service_request_id}); # From the event, not the report
$echo->log($event->{Data});
$event;
};
my $data = Integrations::Echo::force_arrayref($event->{Data}, 'ExtensibleDatum');
my $notes = "";
foreach (@$data) {
$notes = $_->{Value} if $_->{DatatypeName} eq 'Veolia Notes';
if ($self->_has_report_been_sent_to_echo($problem)) {
my $event = $request->{echo_event} || do {
my $echo = $self->feature('echo');
$echo = Integrations::Echo->new(%$echo);
my $event = $echo->GetEvent($request->{service_request_id}); # From the event, not the report
$echo->log($event->{Data}) if $event->{Data};
$event;
};
my $data = Integrations::Echo::force_arrayref($event->{Data}, 'ExtensibleDatum');
foreach (@$data) {
$notes = $_->{Value} if $_->{DatatypeName} eq 'Veolia Notes';
}
}

# An update from Echo with resolution code 1252 means "refer to Bromley"
my $code = $comment->get_extra_metadata('external_status_code') || '';
if ($code eq '1252') {
my $problem = $comment->problem;
$problem->category(REFERRED_TO_BROMLEY); # Will be LBB_RRE_FROM_VEOLIA_STREETS
$problem->state('in progress');
$comment->problem_state('in progress');
Expand Down Expand Up @@ -581,7 +579,7 @@ sub should_skip_sending_update {
my $echo = Integrations::Echo->new(%$cfg);
my $event = $echo->GetEvent($report->external_id);
if ($event->{ResolvedDate}) {
$report->update_extra_field({ name => 'Event_ID', value => $event->{Id} });
$report->update_extra_field({ name => 'Original_Event_ID_(if_applicable)', value => $event->{Id} });
$report->set_extra_metadata('open311_category_override' => REFERRED_TO_VEOLIA);
$report->set_extra_metadata('echo_report_reopened_with_comment' => $update->id);
$report->unset_extra_metadata('external_status_code');
Expand Down Expand Up @@ -666,7 +664,7 @@ sub waste_event_state_map {
Accepted => 'action scheduled',
},
Closed => {
Closed => 'fixed - council',
Closed => 'closed',
Completed => 'fixed - council',
'Not Completed' => 'unable to fix',
'Partially Completed' => 'closed',
Expand Down
9 changes: 5 additions & 4 deletions t/cobrand/bromley.t
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,11 @@ subtest 'redirecting of reports between backends' => sub {
is $c->param('service_code'), 3045;
is $c->param('description'), "$detail | Handover notes - This is a handover note";
};

my $event_guid = '05a10cb2-44c9-48d9-92a2-cc6788994bae';

subtest '...then redirected back to Confirm' => sub {
$report->update({ external_id => 'parent-guid', whensent => DateTime->now, send_method_used => 'Open311' });
$report->update({ external_id => $event_guid, whensent => DateTime->now, send_method_used => 'Open311' });
$mech->post('/waste/echo', Content_Type => 'text/xml', Content => $in);
is $report->comments->count, 2, 'A new update';
is_deeply [ map { $_->state } $report->comments->order_by('id')->all ], ['hidden', 'confirmed'];
Expand All @@ -837,8 +840,6 @@ subtest 'redirecting of reports between backends' => sub {
is_deeply [ map { $_->state } $report->comments->order_by('id')->all ], ['hidden', 'hidden'];
};

my $event_guid = '05a10cb2-44c9-48d9-92a2-cc6788994bae';

subtest 'A report sent to Echo, redirected to Confirm' => sub {
$report->comments->delete;
$report->unset_extra_metadata('original_bromley_external_id');
Expand Down Expand Up @@ -933,7 +934,7 @@ subtest 'redirecting of reports between backends' => sub {
my $req = Open311->test_req_used;
my $c = CGI::Simple->new($req->content);
my $detail = $report->detail;
is $c->param('attribute[Event_ID]'), $event_id, 'old event ID included in attributes';
is $c->param('attribute[Original_Event_ID_(if_applicable)]'), $event_id, 'old event ID included in attributes';
like $c->param('description'), qr/Closed report has a new comment: comment on closed event\r\nBromley pkg-tcobrandbromleyt-bromley\@example.com\r\n$detail/, 'Comment on closed report included in new report description';
};

Expand Down
2 changes: 1 addition & 1 deletion t/cobrand/bromley_waste.t
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ subtest 'updating of waste reports' => sub {
} qr/Fetching data for report/;
$report->discard_changes;
is $report->comments->count, ++$comment_count, 'No new update';
is $report->state, 'fixed - council', 'State change to fixed';
is $report->state, 'closed', 'State change to fixed';
$report->update({ state => 'confirmed' }); # Reset back

$report->update({ external_id => 'waste-15003-' });
Expand Down
17 changes: 16 additions & 1 deletion templates/web/brent/waste/refuse_call_us.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,29 @@

<h1 class="govuk-heading-xl">Please call us</h1>

[% IF date.format < 20250101 %]
<p class="govuk-body">New and replacement rubbish bins cost
[% IF date.format >= 20240329 %]£55[% ELSE %]£50[% END %].
To request one please call our contact centre on 0208 937 5050, Monday to
To request one please call our contact centre on 020 8937 5050, Monday to
Friday, 9am to 5pm (except Bank holidays).</p>

<p class="govuk-body">Please note that all requests for new or replacement
bins will be assessed by our Education and Outreach team. If your request is
approved by the team, payment must then be received before bins can be
delivered.</p>
[% ELSE %]
<p class="govuk-body">New and replacement rubbish bins cost:</p>
<ul class="govuk-list govuk-list--bullet">
<li>£65 for a 140 litre bin</li>
<li>£80 for 240 litre and above (subject to criteria).</li>
</ul>
<p class="govuk-body">To request one please call our contact centre on 020 8937 5050,
Monday to Friday, 9am to 5pm (except Bank holidays) or email
<a href="mailto:[email protected]">[email protected]</a>.</p>

<p class="govuk-body">Please note that all requests for new or replacement bins will
be assessed by our Waste and Recycling team. If your request is approved by the team,
payment must then be received before bins can be delivered.</p>
[% END %]

[% INCLUDE footer.html %]
4 changes: 1 addition & 3 deletions templates/web/surrey/around/intro.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<h1>Report problems and make requests</h1>
<ul>
<li>Report, view and subscribe to updates on a problem in Surrey (potholes, flooding, trees, etc)</li>
</ul>
<p>Report, view and subscribe to updates on a problem in Surrey (potholes, flooding, trees, etc)</p>

0 comments on commit ea54bdb

Please sign in to comment.