Closed Spraynard closed 10 months ago
@michplunkett Sure thing! I'll add in a test when I'm next able. Thanks for looking at this
@sea-kelp I honestly feel the same way, that it is technically possible for another department's officer to be involved in an incident! I'll wait to see what other people's thoughts are about what you said before I continue on this!
Hi all,
I agree with @sea-kelp, sometimes there are incidents that officers take part of that are outside of their jurisdiction but I'm worried that if we allow police to be tagged in incidents outside of their departments we will have unhappy secondary effects.
I wonder if the way to do this properly is to 'untether' incidents from police departments. While you can have an officer and a department linked to an incident, should incidents be "assigned" to a particular PD? (I think not necessary?)
I think that would make sense as long as we are still able to search incidents by involved officer departments (for example, "all incidents that involved a Chicago PD officer and a CBP officer between 2020-01-01 and 2021-01-01").
@sea-kelp That's what I was thinking as well.
Alright I will close this pull request and I will put some context on the issue
Thanks for the PR @Spraynard and all your work on this!
Just so I understand and your hard work doesn't go unused, is the new plan to move incidents to be more generic (away from a specific PD) and removes the need for the validation check? But in the future, we still want to revisit the validations and tests for "incidents"? Is that right?
Fixes issue
Fixes #839
Description of Changes
Adds inline validator to
IncidentForm
that checks to see if the officer entities linked to the instance are in the same department as the incident.Notes for Deployment
Screenshots (if appropriate)
Tests and Linting
develop
branch.pytest
passes on my local development environment.pre-commit
passes on my local development environment.