• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lucyparsons / OpenOversight / 13505519862 / 1
89%
develop: 89%

Build:
DEFAULT BRANCH: develop
Ran 24 Feb 2025 06:52PM UTC
Files 100
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Feb 2025 06:49PM UTC coverage: 89.075% (+0.001%) from 89.074%
13505519862.1

push

github

web-flow
Fix submit image page and python sqlite bug (#1157)

## Description of Changes

_Changes carried over from
https://github.com/OrcaCollective/OpenOversight/pull/533_

Fix bug where submit image page department selector was not submitting
images to the correct department.

It looks like the current implementation was using `selectedIndex` (the
index of the selected `<option>` element in the `<select>`) to determine
the initial department id, which assumes the departments are loaded in
order:


https://github.com/OrcaCollective/OpenOversight/blob/2c5ad9a74/OpenOversight/app/templates/submit_image.html#L79-L82

## Notes for Deployment
None!

## Screenshots (if appropriate)
N/A

## Testing instructions
1. Log in as admin user.
2. Create a new department "Peoria Police Department (PPD)" at
http://localhost:3000/departments/new.
3. Update the user's preferred department to PPD at
http://localhost:3000/auth/change-dept/.
4. Visit the Submit Image page (http://localhost:3000/submit) and
confirm that the populated department is BPD.
5. Upload an image.
6. Verify in devtools that an image was submitted to
http://localhost:3000/upload/departments/4.
7. Update the department selector to Springfield Police Department.
8. Upload an image.
9. Verify in devtools that an image was submitted to
http://localhost:3000/upload/departments/1.
10. Change the preferred department to Springfield Police Department at
http://localhost:3000/auth/change-dept/.
11. Visit the Submit Image page (http://localhost:3000/submit) and
confirm that the populated department is now SPD.
12. Upload an image.
13. Verify in devtools that an image was submitted to
http://localhost:3000/upload/departments/1.

## Checks

 - [x] I have rebased my changes on `main`

 - [x] `just lint` passes

 - [x] `just test` passes

8863 of 9950 relevant lines covered (89.08%)

0.89 hits per line

Source Files on job 13505519862.1
  • Tree
  • List 100
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13505519862
  • 14c3ab45 on github
  • Prev Job for on develop (#13504844618.1)
  • Next Job for on develop (#13506583170.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc