Skip to content

Conversation

thomasiles
Copy link
Contributor

@thomasiles thomasiles commented Oct 2, 2025

This is a branch for testing deleting draft forms

Trello card: https://trello.com/c/tP5Fd96d/2610-add-the-ability-to-delete-a-draft-of-a-live-form-with-a-confirmation-page

image

To test:

  • Use the Review app: https://pr-2260.admin.review.forms.service.gov.uk/
  • Login as the example user: [email protected]
  • Open a live form like those in the "End to end tests" group
  • Create a draft from a live form, make some change (drafts aren't created until you actually change the form so just clicking the create draft button isn't enough)
  • Use the "Delete draft form" button and confirm
  • You should be redirected to the live form page. Create a draft form and check that form matches the live form and doesn't contain any of the changes you made earlier.

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?

Add a new service which will take a live form with a draft and revert
the changes to match the live form.
Add a hint_text optional argument to the delete_confirmation_input partial.
Add the logic to delete the draft from from a live_with_draft form.
Add a hint text to the delete draft live confirmation to help users
understand that deleting a draft will not remove the live form.
Show the delete draft button on live_with_draft forms.
@thomasiles thomasiles force-pushed the deleting-drafts-journey branch from cc60eb3 to ce6f2e9 Compare October 3, 2025 07:44
Copy link

sonarqubecloud bot commented Oct 3, 2025

Copy link

github-actions bot commented Oct 3, 2025

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2260.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.

@thomasiles thomasiles changed the title deleting drafts journey WIP: deleting drafts journey Oct 3, 2025
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