Skip to content

PDJB-942 - Provide Tenancy Details Later Changes - #1641

Open
danielledias-MT wants to merge 57 commits into
mainfrom
feat/pdjb-provide-later-tenancy-details-part-2
Open

PDJB-942 - Provide Tenancy Details Later Changes#1641
danielledias-MT wants to merge 57 commits into
mainfrom
feat/pdjb-provide-later-tenancy-details-part-2

Conversation

@danielledias-MT

@danielledias-MT danielledias-MT commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Ticket number

PDJB-942

Goal of change

Populate Provide tenancy details later page. The 'Save and continue' button takes the Landlord to the CYA page, skipping the Rent pages, and marking Tenancy details as Complete.

Description of main change(s)

  • Provide tenancy details later page populated
  • Mark Tenancy details as Completed
  • Add a temp 'Provide this later' message to CYA
  • Updates journey routing so selecting 'Provide this later' skips rent pages and routes to CYA.
  • Moves numberOfHouseholds templates into templates/forms/restructureAndSkipping and keeps a legacy copy there.
Screenshots **Occupied Property > Households > Provide this later** image

Provide this later
image

Provide this later > CYA
image

Note: this will be updated to match Figma in the next PR.

CYA > Provide this later > Households
image

Tenancy details marked as Complete after provide later
image

Regression Test: Providing Households & Number of People information goes through to Bills
image

Anything you'd like to highlight to the reviewer?

  • There is another PR to update the CYA page as part of PDJB-942.
  • The Provide tenancy details later page for unoccupied properties has been removed from Figma. As Tenancy details is not required for unoccupied properties.

Checklist

Delete any that are not applicable, and add explanation below for any that are applicable but haven't been done

  • Screenshots of any UI changes have been added
  • New journey steps have been added to the appropriate journey integration test(s)
  • Test suite has been run in full locally and is passing
  • Branch has been rebased onto main and run locally, with everything working as expected (both for your new featureand any related functionality)
  • QA instructions have been added to the ticket (particularly if this is the last PR required to complete the ticket)
  • This feature is behind a feature flag. I've checked that there will be no change in function if the feature flag is disabled

…utes through to a new Provide this later page.
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

@TomHanmer29 TomHanmer29 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, just a few comments on style! Happy to approve after the bit with the feature flag in the journey framework is addressed, and please shout if there's anything you want to chat about around that, as it can be a little confusing :)

Comment thread src/main/resources/messages/forms.yml

@Travis-Softwire Travis-Softwire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't reviewed the tests yet, but I think there are tweaks needed and I had a few questions so posting the review now. I'll come back when I've reviewed the tests as well with any further comments there

Comment thread src/main/resources/messages/registerProperty.yml Outdated

@Travis-Softwire Travis-Softwire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And few more minor points on the tests

val content = stepConfig.getStepSpecificContent(mockState)

// Assert
assertEquals("forms.buttons.saveAndContinue", content["submitButtonText"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V. minor but I think elsewhere we split this into separate tests for content and the template

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done - split into separate tests

@danielledias-MT

Copy link
Copy Markdown
Contributor Author

@TomHanmer29 @Travis-Softwire thanks for your reviews!
I still have one comment to addresses, I'll test things locally then I'll push changes when I'm ready tomorrow

@danielledias-MT
danielledias-MT force-pushed the feat/pdjb-provide-later-tenancy-details-part-2 branch from df6d8c0 to 00f3678 Compare July 29, 2026 11:18

@TomHanmer29 TomHanmer29 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny point, and a quick check on the feature flagging. Otherwise happy, will leave to @Travis-Softwire to approve :)

@Travis-Softwire Travis-Softwire left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more points, all pretty minor. Should be good to go once they're addressed - the only one that I might want to see again if you disagree with the comment or the change is non-trivial is the point about forcing the user through the rent screens when they update the number of households - shout if that's a problem

HouseholdStep.ROUTE_SEGMENT, TenantsStep.ROUTE_SEGMENT -> {
duplicableCheckAnswerTask(journey.householdsAndTenantsTask, { HouseHoldsAndTenantsDependencies(true) })
if (featureFlagManager.checkFeature(PROPERTY_REGISTRATION_RESTRUCTURE_AND_SKIPPING)) {
duplicableCheckAnswerTask(journey.tenancyDetailsTask)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this force them through the rent section just to change the number of households or tenants? I don't think we want to do that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you are right - this is for the next PR for the new CYA designs. Will get this sorted

rentAmount = anyOrNull(),
customPropertyType = anyOrNull(),
markedJointLandlord = eq(true),
tenancyProvideLater = anyOrNull(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests that check we're correctly saving this when tenancyProvideLater is true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, added a test

epcExemptionReason: EpcExemptionReason? = null,
epcMeesExemptionReason: MeesExemptionReason? = null,
epcProvideLater: Boolean? = null,
tenancyProvideLater: Boolean = false,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, why are the other provide later's nullable with a default of null and this one is not nullable with a default of false?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't think of a valid reason, I'll update this to be consistent with the other provide later bools

mutableListOf<SummaryListRowViewModel>()
.apply {
val householdsStep = householdsAndTenantsState.households
if (householdsStep.outcome == HouseholdMode.PROVIDE_THIS_LATER) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also call this from in getCheckYourTenancyDetailsAnswersSummaryList which is also calling getRentBillsAndFurnishingsSummaryList which might not have been provided?

@danielledias-MT danielledias-MT Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — added a guard in getCheckYourTenancyDetailsAnswersSummaryList so it only calls getRentBillsAndFurnishingsSummaryList when provideTenancyDetailsLater is false, mirroring the existing guard in getRestructuredOccupiedTenancyDetailsSummaryList.

getCheckYourHouseHoldsAndTenantsAnswersSummaryList(state, state.householdsAndTenantsTask) +
getBedroomsRow(state) +
getRentBillsAndFurnishingsSummaryList(state, messageSource)
if (state.householdsAndTenantsTask.households.outcome == HouseholdMode.PROVIDE_THIS_LATER) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we ever call this function if provide this later is turned on?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be called with provide-later on (when the property is occupied but tenancy details are being provided later)

<p class="govuk-body" th:text="#{registerProperty.provideTenancyDetailsLater.whenToProvide.paragraph}">registerProperty.provideTenancyDetailsLater.whenToProvide.paragraph</p>

<p class="govuk-body" th:text="#{registerProperty.provideTenancyDetailsLater.reason}">registerProperty.provideTenancyDetailsLater.reason</p>
<ul class="govuk-list govuk-list--bullet" aria-label="We will need to know">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a message key for the aria-label as well (if we actually need it? it's included in the content isn't it?)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking a look at Figma

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this so will remove

nextStep { journey.taskListStep }
nextDestination { _ ->
when {
state.provideTenancyDetailsLater -> Destination(state.cyaStep)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these should be journey.<> rather than state.<>

withHeadingMessageKey("registerProperty.taskList.register.restructureAndSkipping.heading", false)
} else {
withHeadingMessageKey("registerProperty.taskList.register.old.heading")
withHeadingMessageKey("registerProperty.taskList.register.heading")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the removing of the 'old' segment from this key might be a merge mistake?


interface PropertyRegistrationJourneyState :
OccupationState,
TenancyDetailsState,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OccupationState already inherits TenancyDetailsState? Or is the idea that OccupationState will be broken up? If so but we're not ready to do that yet should it be a TODO?

val taskListPage =
goToRestructuredPropertyRegistrationTaskList(
PropertyStateSessionBuilder.beforeTenancyDetails(),
beforeTenancyDetails(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the other calls to this use PropertyStateSessionBuilder.beforeTenancyDetails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants