Skip to content

Allow setting a violation section in any town - #280

Merged
hkdobrev merged 1 commit into
mainfrom
feature/violation-section-any-town
Oct 25, 2026
Merged

hkdobrev merged 1 commit into
mainfrom
feature/violation-section-any-town

Conversation

@hkdobrev

Copy link
Copy Markdown
Member

Requested for election day: admins must be able to move a signal to a section in another town.

  • PUT /violations/:id/section no longer requires the same town/municipality; any existing section is accepted and violation.town becomes the section's town.
  • The section history entry payload is now { from, to, fromTown: { code, name }, toTown: { code, name } }.
  • Unchanged: 400 VIOLATION_SECTION_INVALID_FORMAT for non-9-digit input, 409 VIOLATION_SECTION_NOT_FOUND for a nonexistent section, same permission as process/reject.
  • Removed the now unused VIOLATION_SECTION_IN_DIFFERENT_TOWN error. Unit tests updated (other municipality, abroad).

Admins need to fix signals sent for the wrong town too. Any existing section
is accepted and the violation's town follows it; the section history entry now
also records the previous and new town (code and name).
@hkdobrev
hkdobrev merged commit 44e50f4 into main Oct 25, 2026
1 check passed
@hkdobrev
hkdobrev deleted the feature/violation-section-any-town branch October 25, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant