PublicDataWorks / complaint-manager

Apache License 2.0
4 stars 0 forks source link

Update officer details in case creation #624

Open christina-luong opened 1 month ago

christina-luong commented 1 month ago

User Story

As a New Orleans user I want to be able to update officer details in case creation So that the information in the system is up to date

Business Context:

To improve the user workflow, NO has requested that we add the ability to edit officer details while creating a case. Currently, you cannot edit an officer once generated.

In Scope

  1. Add an Edit button next to the Select button in the officer selection screen (see Mockups)
  2. Have a popup that displays the current officer information and allows user to edit (see Mockups)
  3. Any officer updates will be logged for audit purposes.

Out of Scope

  1. Editing officer details out of case creation (could add to admin portal; potential future story)

Open Questions

  1. What is the list of ranks and bureaus? Do we need information for any other dropdowns?

Notes

  1. Any user can update officer details (except read-only users).
  2. Officer updates should permanently change the officers table (not on a case level).

Mockups

Image

Note: Popup will display the current information for the officer Image

Acceptance Criteria

  1. Scenario: Given that I am creating a case And adding an officer When I click the Edit button on a specific officer Then I will see a popup where I can view and edit the officer information

  2. Scenario: Given that I am on the Edit screen for a specific officer When I update any information And press Save Then I will see the changes reflected in the officer select screen

Checklist

Kickoff

Deskcheck

andrew-rist-tw commented 3 weeks ago

How to setup auditing:

In the model, at the bottom, before returning the model object, you want to call <model>.auditDataChange() which will ensure that all changes are audited (see src/server/policeDataManager/models/cases.js for an example).

This may cause some failing tests where someone is inserting into the officers table without setting the auditUser, which is required for audited tables