Skip to content

Remove the dedicated MOUs list page#2919

Draft
theseanything wants to merge 5 commits into
mainfrom
remove-mous-list-page
Draft

Remove the dedicated MOUs list page#2919
theseanything wants to merge 5 commits into
mainfrom
remove-mous-list-page

Conversation

@theseanything

@theseanything theseanything commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Removes the standalone MOUs list page at /mous in favour of the MOUs and agreements shown on the organisation pages.

The organisations pages list each organisation's signed MOUs and agreements (and the organisations index shows MOU-signed status with filtering), so the separate list page is redundant.

Also fixes a latent flake in the rewritten feature specs: they create an organisation before login_as_super_admin_user creates test_org with a hardcoded id of 1, so on a freshly prepared database the organisation could take id 1 from the sequence and collide. The organisation now uses an explicit id.

The organisations pages now show each organisation's signed MOUs and
agreements, making the standalone list at /mous redundant. Point the
header navigation and sitemap at the organisations pages instead, and
drop the now-unused MouSignaturePolicy and locale strings. The MOU
signing flow is unchanged.
@github-actions

Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2919.admin.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

The MOU upgrade spec visits the organisation page straight after
clicking Save, racing the form submission: the save's redirect could
land after the visit and clobber the organisation page, failing the
final assertion. Wait for the redirect to the users page before
navigating, replacing the sleep the spec relied on before it was
rewritten.
The mou_signatures.index locale namespace referred to the MOUs list
view, which no longer exists. Its surviving keys are only used by the
organisations pages, so home them where they are consumed: the
agreement type labels move to mou_signatures.agreement_type as they
describe the model's enum and are shared between the organisations
index, show and filter, while the table headings, preamble and share
links move under organisations.show.mou_signatures alongside the
existing heading. This stops the keys looking like dead code tied to a
deleted view.
The MOU list page is gone and signed MOUs are now shown on each
organisation's page, so the specs covering them describe organisations
page behaviour. Move them to spec/features/organisations and reword
the scenarios to match. The MOU signing flow spec stays where it is,
as signing is unchanged.
Factories and specs inserted organisations with explicit primary keys
(test_org reserved id 1). Explicit-id inserts do not advance the
Postgres id sequence, so on a freshly prepared database any example
mixing a hardcoded-id organisation with a sequence-assigned one could
fail with a unique constraint violation, depending on test order.

Nothing depends on the numeric ids: the organisation factory already
deduplicates by slug, so every record asking for "test-org" shares one
row regardless of id.

The membership factory was only valid because the user's and group's
separately-built organisations both carried id 1 and so compared equal.
Build the group with the user's organisation instead, which is what the
validation actually requires.
@theseanything theseanything force-pushed the remove-mous-list-page branch from 5d1bcd9 to d43abd6 Compare July 14, 2026 11:17
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.

1 participant