Skip to content

Releases: hmrc/pillar2-frontend

0.493.0

13 Mar 16:09
3c77112

Choose a tag to compare

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
    with Seq[DisplayAccountingPeriod] (each period includes
    canAmendStartDate/canAmendEndDate flags).
  • DisplayAccountingPeriod — New model for individual accounting
    periods in the V2 response, with a toAccountingPeriod conversion
    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 from SubscriptionData.upeDetails.registrationDate).
  • subAccountingPeriod changed from AccountingPeriod to
    Option[AccountingPeriod] = None — V2 data no longer synthesises a fake
    singular period; V1 cached data continues to populate it as Some.

Connector

  • readSubscriptionV2 — New method on SubscriptionConnector
    calling the backend V2 endpoint. Handles 404 as NoResultFound
    (consistent with V1 pattern), 422 as UnprocessableEntityError, and
    5xx with the existing retryable gateway error logic.

Service

  • readSubscriptionV2AndSave — New method on SubscriptionService
    that calls readSubscriptionV2, converts the response to
    SubscriptionLocalData (populating accountingPeriods,
    registrationDate, and leaving subAccountingPeriod = None), and saves
    to the user-cache.
  • subscriptionDataV2ToLocalData — Private conversion from
    SubscriptionDataV2 to SubscriptionLocalData.
  • amendGroupOrContactDetails — Updated to handle optional
    subAccountingPeriod, falling back to currentData.accountingPeriod
    from the V1 SubscriptionData when None.

Homepage

  • HomepageController.onPageLoad — When
    amendMultipleAccountingPeriods is enabled, calls
    readSubscriptionV2AndSave and renders the homepage from
    SubscriptionLocalData fields. When disabled, retains the original V1
    maybeReadSubscription + cacheSubscription flow.

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 — Both onPageLoad (summary display)
    and onSubmit (BTN payload) use the chosen period. Falls back to
    subAccountingPeriod only on the CYA summary as a last resort, with
    JourneyRecovery redirect if neither is available.
  • BTNAccountingPeriodController — Audit event uses the period from
    selectAccountingPeriod context directly.
  • BTNStatusAction — Reads BTNChooseAccountingPeriodPage from
    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

12 Mar 12:52
bacd31d

Choose a tag to compare

Release : pillar2-frontend 0.492.0

Last commit sha : bacd31d
Last commit author : Joshua Lamptey
Last commit time : 2026-03-12T12:39:28Z

[PIL-2700] - stop using deprecated method (#649)

0.491.0

06 Mar 14:29
d3bd73a

Choose a tag to compare

Release : pillar2-frontend 0.491.0

Last commit sha : d3bd73a
Last commit author : Joshua Lamptey
Last commit time : 2026-03-06T14:10:07Z

[PIL-2797] - add new abbreviation (#646)

0.490.0

06 Mar 09:48
9e5dbc9

Choose a tag to compare

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 = false under features
  • app/config/FrontendAppConfig.scala: Expose
    amendMultipleAccountingPeriods for 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

05 Mar 10:41
bae88d2

Choose a tag to compare

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

27 Feb 12:19
def69b8

Choose a tag to compare

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

27 Feb 11:15
c7a11fb

Choose a tag to compare

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:

  1. Raw Response Handling: The BTNConnector and BTNService now
    return the raw HttpResponse from the pillar2 backend, which is
    acting as a transparent proxy.
  2. Enhanced Auditing: The BtnSubmissionService has been updated to
    capture the exact status code and response body from the downstream ETMP
    service.
  3. Audit Model Updates: Added ApiResponseData.fromHttpResponse to
    correctly parse raw responses for audit events.
  4. Error Handling: Logic for handling success (201) vs failure
    (non-201) has been moved here from the backend.
  5. Test Updates: Comprehensive updates to BTNConnectorSpec,
    BTNServiceSpec, BtnSubmissionServiceSpec, and
    CheckYourAnswersControllerSpec to mock and verify HttpResponse
    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

24 Feb 11:26
8498d17

Choose a tag to compare

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

23 Feb 16:35
991892b

Choose a tag to compare

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

23 Feb 10:43
840c383

Choose a tag to compare

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