Skip to content

Conversation

@OluwatobiAwe
Copy link
Collaborator

JIRA link

DLSV2-687

Description

Error not properly displayed to conform with all other error across the system.

Screenshots

ErrorDisplay (2)


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors (see info on Text Editor settings to avoid whitespace changes)
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript
  • Tested any Views or partials created or changed with Wave Chrome plugin and addressed any valid accessibility issues
  • Updated/added documentation in Confluence and/or GitHub Readme. List of documentation links added/changed:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken
  • Scanned over my own MR to ensure everything is as expected and it looks right in the browser

@OluwatobiAwe
Copy link
Collaborator Author

So I decided not to use the view Component specifically created for displaying error such as this because the field doesn't belong to a strongly typed model where error messages and validation messages could be added.

Copy link
Contributor

@kevwhitt-hee kevwhitt-hee left a comment

Choose a reason for hiding this comment

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

See changes requested in code.

}
@if (Model.Error)
{
@*<vc:error-summary order-of-property-names="@(new string[] { "userEmail" })" />*@
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be using the error summary view component here. It contains all of the markup included by hand below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

else if (collaboratorId == -4)
{
TempData["FrameworkError"] = $"The email address {userEmail} must match registered DLS Admin account";
TempData["FrameworkError"] = $"The email address must match registered DLS Admin account";
Copy link
Contributor

Choose a reason for hiding this comment

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

Tweak to wording:

"The email address must match registered a DLS Admin account"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

else if (collaboratorId == -2)
{
TempData["FrameworkError"] = $"User with the email address {userEmail} has been previously added";
TempData["FrameworkError"] = $"User with the email address has been previously added";
Copy link
Contributor

Choose a reason for hiding this comment

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

Tweak to wording:

"A user with the email address has been previously added"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@kevwhitt-hee kevwhitt-hee left a comment

Choose a reason for hiding this comment

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

Looks good. Please avoid committing fixes for different tickets in the same PR in future, though.

@kevwhitt-hee kevwhitt-hee merged commit 08976d1 into master Oct 18, 2022
@kevwhitt-hee kevwhitt-hee deleted the Develop/Fixes/DLSV2-687-page-500-error-on-choose-working-group-members-screen-when-given-user-email-not-associated-with-dls-account branch October 18, 2022 07:14
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