Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P4-1784] Render flags from the Person Escort Record instead of the move request #686

Merged
merged 6 commits into from
Jul 28, 2020

Conversation

teneightfive
Copy link
Contributor

@teneightfive teneightfive commented Jul 22, 2020

Proposed changes

What changed

This set of changes amend the behaviour for display tags for a move. Tags will now only be shown when
all sections of the Person Escort Record are completed.

If they have not been completed or a PER has not yet been started it will display a message in place of the
tags showing what needs to be done.

Why did it change

The Person Escort Record is a new feature that allows risk and health information to be collected in more
detail. With this new addition the previous behaviour for rendering flags no longer fits or is appropriate.

This new behaviour avoids the need for any complicated logic to combine the tags and instead will only
display if we know all the information we need.

Issue tracking

Screenshots

Dashboard

This shows the two variations for a complete PER and an incomplete PER

Move detail (incomplete Person Escort Record)

This version display when no Person Escort Record has been started or any section is not complete.

Move detail (complete Person Escort Record)

This version displays when all sections of the Person Escort Record have been completed.

Checklists

Testing

Automated testing

  • Added unit tests to cover changes
  • Added end-to-end tests to cover any journey changes

Manual testing

Has been tested in the following browsers:

  • Chrome
  • Firefox
  • Edge
  • Internet Explorer

Environment variables

  • No environment variables were added or changed

Other considerations

Commit messages with a fix or feat type are automatically used to generate the changelog and
GitHub release notes during the release task. Please make sure they will read well on their own in a
summary of changes and that the commit body gives a more detailed description of those changes if necessary.

@teneightfive teneightfive self-assigned this Jul 22, 2020
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 22, 2020 08:51 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 713960f to a428ccd Compare July 22, 2020 08:59
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 22, 2020 08:59 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from a428ccd to 688aa7c Compare July 22, 2020 09:46
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 22, 2020 09:47 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 688aa7c to 05e8ed2 Compare July 22, 2020 16:57
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 22, 2020 16:58 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 05e8ed2 to e6137e5 Compare July 23, 2020 11:51
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 23, 2020 11:51 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from e6137e5 to 50796cb Compare July 23, 2020 16:52
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 23, 2020 16:52 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 50796cb to d5bb002 Compare July 25, 2020 15:51
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 25, 2020 15:51 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from d5bb002 to 32646ae Compare July 27, 2020 15:01
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 27, 2020 15:01 Inactive
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 32646ae to d3b424d Compare July 27, 2020 20:28
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 27, 2020 20:29 Inactive
@teneightfive teneightfive marked this pull request as ready for review July 27, 2020 21:24
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from d3b424d to 499f657 Compare July 27, 2020 21:26
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 27, 2020 21:26 Inactive
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 28, 2020 08:01 Inactive
Copy link

@JadeNConroy JadeNConroy left a comment

Choose a reason for hiding this comment

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

Looks great to me.

@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 28, 2020 08:14 Inactive
Copy link

@Andy-Millar Andy-Millar left a comment

Choose a reason for hiding this comment

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

Amazing work

@teneightfive teneightfive added blocked Can't be merged yet and removed blocked Can't be merged yet labels Jul 28, 2020
This adds support to receive flags as part of the Person Escort Record
models and relationships.
This extends the card component to support the inclusion of the
GOV.UK Inset Text component.

This pattern will be used to display a message if the item in the card
is in particular states, for example, with an incomplete Person Escort
Record.
This creates a new presenter that will be used within the card
component and on the move detail view to render the flags for a move
from the Person Escort Record framework.
This introduces the ability to display a tag list from the Person
Escort Record framework if this feature is enabled.

It will replace the existing method of displaying the tags from the
assessment answers, but for now both need to live side by side until
the feature is completely released.
This updates the profile to card component to display tags based
on the Person Escort Record instead of the previous assessment answers.

Because the feature is being developed in the background to avoid any
breaking changes this change needs to support the existing method unless
a feature flag is enabled.
Running the tests in a different timezone highlighted an area in the
unit tests where we weren't mocking the timezone.

This fixes that by using timezone mock to ensure the tests will still
pass.
@teneightfive teneightfive force-pushed the person-escort-record/render-flags branch from 499f657 to 76062f7 Compare July 28, 2020 09:41
@teneightfive teneightfive temporarily deployed to booksecuremove-pr-686 July 28, 2020 09:41 Inactive
@codeclimate
Copy link

codeclimate bot commented Jul 28, 2020

Code Climate has analyzed commit 76062f7 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 99.5% (0.0% change).

View more on Code Climate.

@teneightfive teneightfive merged commit 4220302 into master Jul 28, 2020
@teneightfive teneightfive deleted the person-escort-record/render-flags branch July 28, 2020 11:29
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.

4 participants