Skip to content

Commit

Permalink
Merge pull request #309 from UKGovernmentBEIS/dev
Browse files Browse the repository at this point in the history
dev -> staging
  • Loading branch information
Glenn-Clarke authored Sep 30, 2024
2 parents a666542 + 73e8bdb commit 9a2ce74
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@ protected override void Up(MigrationBuilder migrationBuilder)
/// Part of PC-1234, to recover the "missing" data by approximating timestamps for incomplete journeys:
/// This will perform a forward-fill on "RecommendationsFirstRetrievedAt"
/// starting from August 1st onward, filling in null values with the most recent non-null value.
///
/// After release, we realised there was a mistake in this migration: it did not account for old users
/// revisiting the site and retrieving recommendations for PropertyData generated before August. This was
/// fixed manually on all environments using the following script:
///
/// with older_rows as (
/// select *, lag("RecommendationsFirstRetrievedAt") over (order by "PropertyDataId") as prev
/// from "PropertyData"
/// where "PropertyDataId" < N
/// ),
/// rows_to_clear as (
/// select * from older_rows
/// where "RecommendationsFirstRetrievedAt" = prev
/// )
/// update "PropertyData"
/// set "RecommendationsFirstRetrievedAt" = null
/// where "PropertyDataId" in (select "PropertyDataId" from rows_to_clear)
/// and extract(month from "RecommendationsFirstRetrievedAt") = 8;
///
/// where N was the manually-observed start point of August (for prod this was 481800). We could not do
/// something like:
/// select max("PropertyDataId") from "PropertyData" where extract(month from "RecommendationsFirstRetrievedAt") = 7
/// because there was one pathological row with a July timestamp (and no reference code) that appeared to
/// have been insterted in August - this was raised as a separate issue (PC-1287).
migrationBuilder.Operations.Add(new SqlOperation
{
Sql = @"
Expand Down
4 changes: 2 additions & 2 deletions SeaPublicWebsite/Resources/SharedResources.cy.resx
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@
<value>Os ydych chi’n hoffi unrhyw un o’r argymhellion hyn, gallwch eu cadw yn eich cynllun gweithredu cyn bwrw ymlaen.</value>
</data>
<data name="CostsAndSavingsAreEstimatesWarningTextString" xml:space="preserve">
<value>Amcangyfrifon yw’r costau a’r arbedion a ddarparwn ac efallai na fyddant yr un fath yn ymarferol. Mae'r arbedion a ddangosir wedi’u seilio ar gap prisiau ynni Gorffennaf 2024 yn achos biliau nwy a thrydan, ac ar brisiau ynni RdSAP yn achos pob math arall o danwydd gwresogi. Wrth i brisiau ynni newid, felly bydd yr amcangyfrifon o arbedion.</value>
<value>Amcangyfrifon yw’r costau a’r arbedion a ddarparwn ac efallai na fyddant yr un fath yn ymarferol. Mae'r arbedion a ddangosir wedi’u seilio ar gap prisiau ynni Hydref 2024 yn achos biliau nwy a thrydan, ac ar brisiau ynni RdSAP yn achos pob math arall o danwydd gwresogi. Wrth i brisiau ynni newid, felly bydd yr amcangyfrifon o arbedion.</value>
</data>
<data name="Getting back to your recommendations once you leave" xml:space="preserve">
<value>Mynd yn ôl at eich argymhellion ar ôl i chi adael</value>
Expand Down Expand Up @@ -1987,7 +1987,7 @@
<value>Sylwer</value>
</data>
<data name="FiguresForTypicalInstallationWarningTextString" xml:space="preserve">
<value>Sylwer Mae’r ffigurau hyn ar gyfer gosodiad arferol mewn cartref fel eich un chi. Bydd eich amgylchiadau, manylion y gosodiadau a phrisiau ynni yn effeithio ar y costau a’r arbedion a welwch. Mae'r arbedion a ddangosir wedi’u seilio ar gap prisiau ynni Gorffennaf 2024 yn achos biliau nwy a thrydan, ac ar brisiau ynni RdSAP yn achos pob math arall o danwydd gwresogi. Wrth i brisiau ynni newid, felly bydd yr amcangyfrifon o arbedion.</value>
<value>Sylwer Mae’r ffigurau hyn ar gyfer gosodiad arferol mewn cartref fel eich un chi. Bydd eich amgylchiadau, manylion y gosodiadau a phrisiau ynni yn effeithio ar y costau a’r arbedion a welwch. Mae'r arbedion a ddangosir wedi’u seilio ar gap prisiau ynni Hydref 2024 yn achos biliau nwy a thrydan, ac ar brisiau ynni RdSAP yn achos pob math arall o danwydd gwresogi. Wrth i brisiau ynni newid, felly bydd yr amcangyfrifon o arbedion.</value>
</data>
<data name="1 minute" xml:space="preserve">
<value>1 funud</value>
Expand Down
4 changes: 2 additions & 2 deletions SeaPublicWebsite/Resources/SharedResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@
<value>If you like any of these recommendations, you can save them to your action plan before you move on.</value>
</data>
<data name="CostsAndSavingsAreEstimatesWarningTextString" xml:space="preserve">
<value>The costs and savings we provide are estimates and may not be the same in practice. The savings displayed are based on the July 2024 energy price cap for gas and electricity bills, and on the RdSAP energy prices for all other heating fuel types. As energy prices change, so will the estimates of savings.</value>
<value>The costs and savings we provide are estimates and may not be the same in practice. The savings displayed are based on the October 2024 energy price cap for gas and electricity bills, and on the RdSAP energy prices for all other heating fuel types. As energy prices change, so will the estimates of savings.</value>
</data>
<data name="Getting back to your recommendations once you leave" xml:space="preserve">
<value>Getting back to your recommendations once you leave</value>
Expand Down Expand Up @@ -2205,7 +2205,7 @@
<value>Note</value>
</data>
<data name="FiguresForTypicalInstallationWarningTextString" xml:space="preserve">
<value>These figures are for a typical installation in a home like yours. The costs and savings you experience will be affected by your circumstances, the details of the installations and energy prices. The savings displayed are based on the July 2024 energy price cap for gas and electricity bills, and on the RdSAP energy prices for all other heating fuel types. As energy prices change, so will the estimates of savings.</value>
<value>These figures are for a typical installation in a home like yours. The costs and savings you experience will be affected by your circumstances, the details of the installations and energy prices. The savings displayed are based on the October 2024 energy price cap for gas and electricity bills, and on the RdSAP energy prices for all other heating fuel types. As energy prices change, so will the estimates of savings.</value>
</data>
<data name="1 minute" xml:space="preserve">
<value>1 minute</value>
Expand Down

0 comments on commit 9a2ce74

Please sign in to comment.