Skip to content

Make task status service aware of current user#2756

Merged
DavidBiddle merged 3 commits intomainfrom
make-task-status-service-aware-of-current-user
May 7, 2026
Merged

Make task status service aware of current user#2756
DavidBiddle merged 3 commits intomainfrom
make-task-status-service-aware-of-current-user

Conversation

@DavidBiddle
Copy link
Copy Markdown
Contributor

@DavidBiddle DavidBiddle commented May 6, 2026

What problem does this pull request solve?

Trello card: No card for main change, but also includes https://trello.com/c/TVN9BNxQ/3448-refactor-formtaskstatusservice-to-use-dependency-injection

Passes the current user to the task status service. This follows the work in #2745 so that the task statuses are consistent everywhere.

This resolves an issue we were seeing where:

  • the Welsh translation page had a non-gov.uk email address which matched the user's domain
  • the page as a whole was valid and marked complete
  • but the task in the task list was still showing as 'In progress'
  • the form could not be made live.

Also includes a factory change to make testing Welsh forms easier (cherry-picked from #2717)

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?

@DavidBiddle DavidBiddle force-pushed the make-task-status-service-aware-of-current-user branch from 84e45a9 to 2f3a44c Compare May 6, 2026 13:40
@DavidBiddle DavidBiddle changed the title Inject task status service as dependency of form model Make task status service aware of current user May 6, 2026
@DavidBiddle DavidBiddle force-pushed the make-task-status-service-aware-of-current-user branch 3 times, most recently from e21a7e2 to 1b7128b Compare May 6, 2026 14:32
@DavidBiddle DavidBiddle force-pushed the make-task-status-service-aware-of-current-user branch from 1b7128b to 8726c1c Compare May 6, 2026 15:45
@DavidBiddle DavidBiddle marked this pull request as ready for review May 7, 2026 08:16
stephencdaly
stephencdaly previously approved these changes May 7, 2026
Copy link
Copy Markdown
Contributor

@stephencdaly stephencdaly left a comment

Choose a reason for hiding this comment

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

Changes look good and the bug is fixed.

Do you reckon it's worth adding a test for the scenario where the user enters a non-government email in the Welsh translations to check that the validation passes to prevent a regression?

@DavidBiddle DavidBiddle force-pushed the make-task-status-service-aware-of-current-user branch from 8726c1c to 2a00405 Compare May 7, 2026 11:20
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

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

@DavidBiddle
Copy link
Copy Markdown
Contributor Author

@stephencdaly good shout, I've added a test for that now

@DavidBiddle DavidBiddle added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit a65e46b May 7, 2026
4 checks passed
@DavidBiddle DavidBiddle deleted the make-task-status-service-aware-of-current-user branch May 7, 2026 11:44
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