Releases: hmrc/pillar2-frontend
0.493.0
Release : pillar2-frontend 0.493.0
Last commit sha : 3c77112
Last commit author : olakunlekuye2
Last commit time : 2026-03-13T15:56:45Z
PIL-2855: Display Multiple Accounting Periods on Manage Group Details (#648)
Migrates the frontend to use the new Read Subscription V2 endpoint
(which returns an array of accounting periods) behind the
amendMultipleAccountingPeriods feature flag, while retaining full
backward compatibility with the existing V1 flow.
ETMP are introducing a breaking change to the Display Subscription API.
Replacing a singular accounting period with an array of accounting
periods. This PR introduces a V2 path on the frontend that consumes the
new response shape, converts it to the existing SubscriptionLocalData
cache model, and allows both V1 and V2 data to coexist without
invalidating any user's cache.
This also adds the first page of the new amend multiple accounting
periods journey -the Manage Group Details summary page now renders a
multi-period view with individual period cards when the feature flag is
enabled.
Additionally, this work exposed a pre-existing bug in the BTN flow where
the confirmation page and submission payload were using the accounting
period from the subscription data rather than the period the user
actually selected during the journey. This has been fixed so the entire
BTN flow now consistently uses the user's chosen period.
What changed
Models
SubscriptionDataV2— New model representing the V2 API response
withSeq[DisplayAccountingPeriod](each period includes
canAmendStartDate/canAmendEndDateflags).DisplayAccountingPeriod— New model for individual accounting
periods in the V2 response, with atoAccountingPeriodconversion
helper.SubscriptionLocalData— Two new optional fields added with
defaults for backward compatibility:accountingPeriods: Option[Seq[DisplayAccountingPeriod]]— populated
from V2 data.registrationDate: Option[LocalDate]— populated from V2
upeDetails. This was added so the homepage can display the
registration date through the V2 path without requiring a separate
homepage-specific model or a second API call (in the V1 flow, this value
comes directly fromSubscriptionData.upeDetails.registrationDate).subAccountingPeriodchanged fromAccountingPeriodto
Option[AccountingPeriod] = None— V2 data no longer synthesises a fake
singular period; V1 cached data continues to populate it asSome.
Connector
readSubscriptionV2— New method onSubscriptionConnector
calling the backend V2 endpoint. Handles404asNoResultFound
(consistent with V1 pattern),422asUnprocessableEntityError, and
5xxwith the existing retryable gateway error logic.
Service
readSubscriptionV2AndSave— New method onSubscriptionService
that callsreadSubscriptionV2, converts the response to
SubscriptionLocalData(populatingaccountingPeriods,
registrationDate, and leavingsubAccountingPeriod = None), and saves
to the user-cache.subscriptionDataV2ToLocalData— Private conversion from
SubscriptionDataV2toSubscriptionLocalData.amendGroupOrContactDetails— Updated to handle optional
subAccountingPeriod, falling back tocurrentData.accountingPeriod
from the V1SubscriptionDatawhenNone.
Homepage
HomepageController.onPageLoad— When
amendMultipleAccountingPeriodsis enabled, calls
readSubscriptionV2AndSaveand renders the homepage from
SubscriptionLocalDatafields. When disabled, retains the original V1
maybeReadSubscription+cacheSubscriptionflow.
Manage Group Details
ManageGroupDetailsCheckYourAnswersController— When the flag is
enabled, fetches V2 data and renders a multi-period summary view with
individual period cards showing amendable date ranges.ManageGroupDetailsMultiPeriodView— New view template for
rendering multiple accounting periods with Change links.
BTN Flow
Decoupled the BTN flow from subAccountingPeriod entirely — all BTN
controllers now source the accounting period from the user's chosen
period (BTNChooseAccountingPeriodPage in user answers):
BTNConfirmationController— Confirmation page dates come from
the chosen period, not subscription data.CheckYourAnswersController— BothonPageLoad(summary display)
andonSubmit(BTN payload) use the chosen period. Falls back to
subAccountingPeriodonly on the CYA summary as a last resort, with
JourneyRecoveryredirect if neither is available.BTNAccountingPeriodController— Audit event uses the period from
selectAccountingPeriodcontext directly.BTNStatusAction— ReadsBTNChooseAccountingPeriodPagefrom
user answers for the already-submitted audit.
Feature flag
All V2 behaviour is gated behind
features.amendMultipleAccountingPeriods (defaults to false). When
false, the frontend behaves identically to before this PR.
Co-authored-by: JamesMMiller 7511223+JamesMMiller@users.noreply.github.com
0.492.0
0.491.0
0.490.0
Release : pillar2-frontend 0.490.0
Last commit sha : 9e5dbc9
Last commit author : olakunlekuye2
Last commit time : 2026-03-06T09:30:05Z
PIL-2854 Add amendMultipleAccountingPeriods feature flag (#644)
Summary
Adds feature flag amendMultipleAccountingPeriods for the Change
Accounting period feature (V2 endpoints for Display Subscription and
Amend Subscription).
Changes
- conf/application.conf: Add
amendMultipleAccountingPeriods = falseunderfeatures - app/config/FrontendAppConfig.scala: Expose
amendMultipleAccountingPeriodsfor injection in controllers/connector - test/config/FrontendAppConfigSpec.scala: Test that flag defaults
to false
Acceptance criteria
- Flag exists in config, defaults to false
- Flag can be toggled per environment (same mechanism as other
feature flags) - Flag is injectable into controllers that handle accounting period
display and amendment flows (via existing FrontendAppConfig injection)
Out of scope (follow-up)
- V2 endpoint switching logic; this ticket is feature-flag setup only.
Co-authored-by: Mannkaur2 211959528+Mannkaur2@users.noreply.github.com
0.489.0
Release : pillar2-frontend 0.489.0
Last commit sha : bae88d2
Last commit author : Joshua Lamptey
Last commit time : 2026-03-05T10:24:42Z
Nojira fix btn (#645)
This PR fixes a mac only 'bug' where our filesystem would treat
identically named files (except casing) as the same file which would
cause a myriad of errors upon running our service locally when
submitting a BTN. This is because we had both BtnSuccess and
BTNSuccess in our codebase and they both did the same thing. This
confused the JVM heavily.
Changes:
- Unified the new changes and our existing functionality under one file
with no duplication. - Slight refactor of the method that used these case classes
0.488.0
Release : pillar2-frontend 0.488.0
Last commit sha : def69b8
Last commit author : Kevin Coatsworth
Last commit time : 2026-02-27T12:00:10Z
PIL-2249: Small clean up following the submission frontend merge (#642)
The digital team will merge submissions frontend and Phase 1
repositories. This will help to support a smooth handover to live
services.
Conduct the audit
Remove as much duplication as possible
0.487.0
Release : pillar2-frontend 0.487.0
Last commit sha : c7a11fb
Last commit author : James Miller
Last commit time : 2026-02-27T10:58:28Z
PIL-2624 - Update BTN to handle raw response from ETMP (#639)
This PR implements the frontend portion of the BTN Audit refactoring
(PIL-2624).
Key Changes:
- Raw Response Handling: The
BTNConnectorandBTNServicenow
return the rawHttpResponsefrom thepillar2backend, which is
acting as a transparent proxy. - Enhanced Auditing: The
BtnSubmissionServicehas been updated to
capture the exact status code and response body from the downstream ETMP
service. - Audit Model Updates: Added
ApiResponseData.fromHttpResponseto
correctly parse raw responses for audit events. - Error Handling: Logic for handling success (201) vs failure
(non-201) has been moved here from the backend. - Test Updates: Comprehensive updates to
BTNConnectorSpec,
BTNServiceSpec,BtnSubmissionServiceSpec, and
CheckYourAnswersControllerSpecto mock and verifyHttpResponse
objects and ensure compilation success.
Motivation:
To improve visibility into downstream errors and ensure the audit trail
accurately reflects the raw response from ETMP.
0.486.0
Release : pillar2-frontend 0.486.0
Last commit sha : 8498d17
Last commit author : Joshua Lamptey
Last commit time : 2026-02-24T11:13:42Z
[PIL-2822] - update repayment and btn confirmation pages to show updated info for agent views (#641)
Key Changes:
- Updated messages.en
- pass in accountingperiodenddate and company name from controllers to
view - add new extension method for datetimeutils which will format to follow
mural example - add and refactor unit tests
0.485.0
Release : pillar2-frontend 0.485.0
Last commit sha : 991892b
Last commit author : Kevin Coatsworth
Last commit time : 2026-02-23T16:16:57Z
PIL-2820: Removed invalid tags from views. Uncommented previously… (#640)
… blocked accessibility tests for these views
The following views currently use invalid <a> tags (example: <a> @messages("unauthorised.agent.message2")</a>). Remove these invalid
tags and ensure content still shows correctly in the view. Then
uncomment the accessibility tests in each of their view specs.
UnauthorisedAgentView
RegistrationNotCalledUpeView
RegistrationNotCalledNfmView
UnauthorisedIndividualView
CannotReturnAfterSubscriptionView
0.484.0
Release : pillar2-frontend 0.484.0
Last commit sha : 840c383
Last commit author : olakunlekuye2
Last commit time : 2026-02-23T10:24:11Z
PIL-2771 Update the homepage title and H1 (#630)
PIL-2771: Update the homepage title and H1
Co-authored-by: Kevin Coatsworth 29205960+kevincoatsworth@users.noreply.github.com