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

Provide Ministry Ability to Edit Student Basic BCeID Profile Info #3222

Closed
15 tasks
HRAGANBC opened this issue May 6, 2024 · 8 comments
Closed
15 tasks

Provide Ministry Ability to Edit Student Basic BCeID Profile Info #3222

HRAGANBC opened this issue May 6, 2024 · 8 comments
Assignees
Labels
Ministry Ministry Features User Story

Comments

@HRAGANBC
Copy link
Collaborator

HRAGANBC commented May 6, 2024

Story Description
As a Ministry user, I want to be able to edit critical details of a BasicBCeID student's profile and contact info, so that a student's info can remain accurate and up to date. This also allows me to identify the type of login credentials the student has used to log in, which can help me identify where they need to go for login/password issues.

Acceptance Criteria:

  • Enable Ministry to edit profile details of a Basic BCeID student's account. (Given Names, Last name, DOB, and email)
  • Create an edit button that allows the update of the 4 fields listed above.
  • Anytime a single, or multiple fields are edited, Ministry user must add a note. (General)
  • Treat this like a personal information change from BCSC logins and do a new SIN verification for any DOB, Given name, or Last name (not case-sensitive changes "C" to "c")
  • Replicate the role for account approval of Basic BCeID and create a new one.
  • Update the role spreadsheet

Business Context

  • Before BasicBCeID account approval, Ministry can edit fields and then approve
  • After BasicBCeID account approval, Student can edit only their address info, but not their profile details. Ministry can not edit anything on behalf of a student. Process would require student to submit new account, and historical account details would not be imported.
  • Currently, we receive personal information updates on BCSC accounts on each log in by the student and will update accordingly. If DOB, First Name, or Last Name (not case-senstive) change, this will automatically trigger a new SIN verification process.
  • Changing the personal information for a BCeID profile (DOB, Given Name, or Last Name) will start a new SIN verification process.

image.png

Note: disability status and SIN update processes do not need to be changed.

Technical

  • Student users authenticating using BCeID can be identified using the sims.users.identity_provider_type as bceidboth. Please note that bceidbasic and bceidbusiness are present on DB enum but are not configured.
  • Create a new button in the top-right (same as other areas) enabled only for BCeID students.
    • Create a new role to restrict the action.
  • Create a modal to edit the required fields below, applying the same validations from the student profile (same for notes).
    • Given name
    • Last name
    • Date of birth
    • Email
    • Note
  • Add note to the student notes. The note should be created using the shared method createStudentNote. No need to persist the generated note ID to the students or users table. Apply the same validations for other areas collecting notes.
  • Create a new endpoint to allow the student to update.
    • Validate if the student is a BCeID student.
    • Suggested endpoint: PATCH "aest/student/:studentId".
  • E2E Test
    • Should allow student profile update when the student is authenticating using BCeID.
    • Should throw an HTTP exception if the student profile is updated when the student is not authenticating using BCeID.
@HRAGANBC HRAGANBC added the Business Items under Business Consideration label May 6, 2024
@HRAGANBC HRAGANBC self-assigned this May 6, 2024
@michesmith michesmith added this to the 2.0 Part-Time Students MVP milestone May 6, 2024
@AnnaPBashkatova
Copy link
Collaborator

AnnaPBashkatova commented May 7, 2024

Additional information to consider: As a Ministry User I can not distinct between BasicBCeID and BC Services Student account once they are created. BC Services student account profile updates must be directed to Service BC and BasicBCeID dealt in the house. How as a Ministry User I can tell which case I am dealing with? Confirm with student verbally? Can information be conveyed by SIMS instead?

@HRAGANBC
Copy link
Collaborator Author

HRAGANBC commented May 8, 2024

@AnnaPBashkatova - You're right, however there is some way to distinguish --- the Ministry user can search through JIRA history to see if a ticket was created when this student initially requested account creation.

Given there is an alternative way of accomplishing this task - however unpleasant - I would deem your suggestion as 'non-critical' for MVP.

That being said, can you please log a quick barebones ticket to capture that nuance, and we can discuss and triage to a post-MVP release?

@AnnaPBashkatova
Copy link
Collaborator

@HRAGANBC. Thank you, Hugh. Created separate ticket #3244.

@Joshua-Lakusta Joshua-Lakusta added Dev & Architecture Development and Architecture and removed Business Items under Business Consideration labels Jul 2, 2024
@HRAGANBC HRAGANBC assigned JerPearson and unassigned HRAGANBC Jul 24, 2024
@andrewsignori-aot andrewsignori-aot removed the Dev & Architecture Development and Architecture label Sep 16, 2024
@sh16011993 sh16011993 self-assigned this Sep 23, 2024
@andrewsignori-aot
Copy link
Collaborator

@JerPearson @CarlyCotton While updating first name, last name, or DBO we also trigger a new SIN validation.
We will do the same reusing the method already in place for when the BCSC student changes his data. So, when the Ministry updates the BCeID user data it will trigger a SIN validation. It would be good to make it explicit in the AC to be clear for QAs in the future.

@CarlyCotton
Copy link
Collaborator

@andrewsignori-aot Thank you - I've added business context and an AC to treat this similarly to the BCSC process that happens already.

FYI @sh16011993 @JerPearson

@andrewsignori-aot
Copy link
Collaborator

@CarlyCotton @JerPearson When the student is authenticating using BCSC the profile date is checked and it will be updated if the name or DOB is changed. For the Ministry editing the basic BCeID we are now saving a note to the student's notes, can we do the same for the BCSC update already in place?
Suggested hard-coded notes would be: "BCSC authenticated student profile data updated."

@JerPearson
Copy link
Collaborator

I think that's a great idea. Would be very helpful for staff and aligns the outcomes for both paths.

@sh16011993
Copy link
Collaborator

Thank You @andrewsignori-aot and @JerPearson. Code updated accordingly.

github-merge-queue bot pushed a commit that referenced this issue Oct 15, 2024
…#3770)

### As a part of this PR, the following were completed:

**Business Requirements Completed:**

- Enabled ministry user the ability to edit the profile details of a
Basic BCeID student's account **(Given Names, Last name, DOB, and
email)**.
- Added a General Note for this profile information update.
- Treated the update like a personal information change from BCSC logins
and did a new SIN verification for any DOB, Given name, or Last name
(ensuring that the match of the information is not case-sensitive).
- Replicated the role for account approval of Basic BCeID and created a
new one for this scenario.
- Updated the roles spreadsheet.

**Technical Requirements Completed:**

- Created an edit button and a model that opens on clicking the edit
button to allows for the update of the 4 fields (Given Names, Last name,
DOB, and Email). All fields except **GivenNames** are mandatory.
- Added a General Note for the same.
- Applied the same validations from the student profile for the
validations of the user fields in the modal. `GivenName` is empty and
therefore, will not throw any validation error and can be persisted as
an empty field.
- To achieve the above, created a new endpoint PATCH
`aest/student/:studentId`. Performed the validation if the student is a
BCeID student and also validated the user fields and added the same role
(`student-edit-profile`) to this endpoint.

**Note:** I tried using the `v-date-input` for the Date component in the
modal but it is a lab component and I ran into issues with using this
component. Issues, for instance, `clearable` not clearing the field etc.
Therefore, I have used the regular `v-text-field` with the `type=date`.

**e2e tests will be part of the next PR.**

### Screenshots

- **Edit Profile button for the Basic BCeID student**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/d1963de0-753e-43bd-8da5-bf8828198569">


-------------------------------------------------------------------------------------------------------

- **Edit Profile Modal**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/f2fe7dca-a626-4a7a-b18f-30e974c93080">


-------------------------------------------------------------------------------------------------------

- **Validations for the Edit Profile Modal**

<img width="1919" alt="image"
src="https://github.com/user-attachments/assets/d3758f37-7783-4a9a-ade2-fa891c3688a6">


-------------------------------------------------------------------------------------------------------

- **Date Validation not showing the date beyond the today's date for the
date of birth**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/d6f01bd8-c7e7-4f68-a3a1-3d9012e8afa0">


-------------------------------------------------------------------------------------------------------

- **Empty Given Names does not throw any validation error.**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/3aae06f3-b832-4f99-befb-dedd997492a0">


-------------------------------------------------------------------------------------------------------

- **`Snackbar` showing the update after the successful update**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/fae4c34a-c574-46da-ace2-5a4e4d0268ed">


-------------------------------------------------------------------------------------------------------

- **`Snackbar` showing the error message if an error happens for any
reason during the student profile update**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/e6fa2a5e-ef00-4c23-bc3c-3e454d093f44">


-------------------------------------------------------------------------------------------------------

- **Added Notes in the General section**

<img width="1919" alt="image"
src="https://github.com/user-attachments/assets/77fba118-4cc8-41f4-bda1-ce508e7cd229">


-------------------------------------------------------------------------------------------------------

- **Processing loader while the information is being updated**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/bb54ab5c-2cf4-4cb7-ac4c-6782f12facac">


-------------------------------------------------------------------------------------------------------

- **Edit Profile button not shown for any non Basic BCeID user**

<img width="1920" alt="image"
src="https://github.com/user-attachments/assets/f46c7392-a04a-4d63-9d8e-fd2f8811777f">
github-merge-queue bot pushed a commit that referenced this issue Oct 16, 2024
… (e2e tests) (#3794)

### As a part of this PR, the following e2e tests were written:

`StudentAESTController(e2e)-updateProfileInformation`
√ Should allow the student profile update when the student is a Basic
BCeID user. (5472 ms)
√ Should throw an HTTP Unprocessable Entity (422) error when the student
is not a Basic BCeID user. (2619 ms)
√ Should throw an HTTP Forbidden (403) error when the ministry user
performing the profile update does not have the associated role. (497
ms)
√ Should throw an HTTP Unprocessable Entity (422) error when the student
is a Basic BCeID user but none of the user profile information that
needs to be updated has changed. (3076 ms)
√ Should throw an HTTP Not Found (404) error when the student does not
exist. (514 ms)
√ Should throw an HTTP Bad Request error when some mandatory profile
update information is missing from the payload. (7 ms)
√ Should allow the student profile update when the student is a Basic
BCeID user and the givenNames is not provided. (4945 ms)

### Screenshot of the passed e2e tests: 

<img width="1244" alt="image"
src="https://github.com/user-attachments/assets/32d19cac-be2c-477c-b7a7-250532132d45">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ministry Ministry Features User Story
Projects
None yet
Development

No branches or pull requests

9 participants