Skip to content

Use declaration_markdown only for form declarations - #2334

Merged
lfdebrux merged 3 commits into
mainfrom
ldeb-remove-declaration-text
Sep 9, 2026
Merged

Use declaration_markdown only for form declarations#2334
lfdebrux merged 3 commits into
mainfrom
ldeb-remove-declaration-text

Conversation

@lfdebrux

@lfdebrux lfdebrux commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Fixes issue reported by user in Zendesk ticket https://govuk.zendesk.com/agent/tickets/6829206.

As of May 2026 all form documents now have a declaration_markdown property (confirmed using gds aws forms-prod-support -- forms data_api -d forms-admin -s $'SELECT COUNT(*) FROM form_documents WHERE NOT content ? \'declaration_markdown\';'), and the declaration_text property is no longer updated (see govuk-forms/forms-admin#2620).

However, form documents can still have the declaration_text property, and some form documents have no declaration (blank declaration_markdown) but a non-blank declaration_text.

To stop a declaration from being shown in this scenario, this PR removes the code that showed the contents of declaration_text. We also update all specs to use declaration_markdown.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

Update the form document content to the latest schema version.
As of May 2026 all form documents now have a `declaration_markdown`
property, and the `declaration_text` property is no longer updated (see
govuk-forms/forms-admin#2620). However, form documents can still have
the `declaration_text` property, and some form documents have no
declaration (blank `declaration_markdown`) but a non-empty
`declaration_text`.

To stop a declaration from being shown in this scenario, this commit
removes the code that showed the contents of `declaration_text`.
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🎉 A review copy of this PR has been deployed! It is made of up two components

  1. A review copy of forms-runner
  2. A production copy of forms-admin

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.

@lfdebrux
lfdebrux added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 9bb13de Sep 9, 2026
4 checks passed
@lfdebrux
lfdebrux deleted the ldeb-remove-declaration-text branch September 9, 2026 13:22
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.

2 participants