diff --git a/SeaPublicWebsite.Data/Migrations/20240806095041_ForwardFillTimestamps.cs b/SeaPublicWebsite.Data/Migrations/20240806095041_ForwardFillTimestamps.cs index 6908b6d8..74c9ce71 100644 --- a/SeaPublicWebsite.Data/Migrations/20240806095041_ForwardFillTimestamps.cs +++ b/SeaPublicWebsite.Data/Migrations/20240806095041_ForwardFillTimestamps.cs @@ -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 = @" diff --git a/SeaPublicWebsite/Resources/SharedResources.cy.resx b/SeaPublicWebsite/Resources/SharedResources.cy.resx index fa2f52fe..47887310 100644 --- a/SeaPublicWebsite/Resources/SharedResources.cy.resx +++ b/SeaPublicWebsite/Resources/SharedResources.cy.resx @@ -838,7 +838,7 @@ Os ydych chi’n hoffi unrhyw un o’r argymhellion hyn, gallwch eu cadw yn eich cynllun gweithredu cyn bwrw ymlaen. - 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. + 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. Mynd yn ôl at eich argymhellion ar ôl i chi adael @@ -1987,7 +1987,7 @@ Sylwer - 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. + 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. 1 funud diff --git a/SeaPublicWebsite/Resources/SharedResources.resx b/SeaPublicWebsite/Resources/SharedResources.resx index d9836f57..eff9304a 100644 --- a/SeaPublicWebsite/Resources/SharedResources.resx +++ b/SeaPublicWebsite/Resources/SharedResources.resx @@ -974,7 +974,7 @@ If you like any of these recommendations, you can save them to your action plan before you move on. - 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. + 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. Getting back to your recommendations once you leave @@ -2205,7 +2205,7 @@ Note - 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. + 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. 1 minute