-
Notifications
You must be signed in to change notification settings - Fork 78
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
Display officer - assignment end date #825
Comments
I can work on this! It seems pretty self-explanatory tbh. For writing tests, it seems like there are a three tests about editing assignments in Also btw noticed there isn't validation that the resign date comes after the start date, not sure if that's a problem at all though. Anyway let me know if it's okay for me to start working on this! |
Great, I assigned it to you. Will reply to the other details later, but it sounds like you are on a good path |
I think it's fine to add to the existing tests, maybe add new ones if you want to do a different approach or do additional tests
Good call. I think it makes sense to validate that, at least with the data that comes from the form |
Thanks for the responses, it definitely was the right call to add to existing tests so you'll notice I changed some test names in The biggest twist is that once I added the validation, I noticed that the validation errors were not actually making it to the UI when adding an assignment in the officer-view. This because in the add_assignment view, previously errors were simply being logged, but then the view redirected back to the main officer view, not including any form data that contained the errors. You can see that on the develop branch here. You can see my change here. Definitely let's touch base if these changes are too much, since they seem beyond the scope of the original issue. I added two tests for checking that these validation errors do appear in the HTML when incorrect data is submitted to the AssignmentForm. |
Assignments are the link between an officer and the rank they have and the unit they belong to. As such assignments have a start-date and an end-date (unfortunately named
resign_date
in our code).However, the end-date of an assignment is not shown in the officer-view (see for example: https://openoversight.com/officer/11943). Additionally the form to add or edit an assignment also doesn't have an assignment end entry.
So I think we should fix both those issues.
The text was updated successfully, but these errors were encountered: