Skip to content

Add urgency (-1/0/1) to melding#667

Merged
joeyamst merged 3 commits intomainfrom
feature/7146-urgency-field
Mar 10, 2026
Merged

Add urgency (-1/0/1) to melding#667
joeyamst merged 3 commits intomainfrom
feature/7146-urgency-field

Conversation

@joeyamst
Copy link
Contributor

@joeyamst joeyamst commented Mar 9, 2026

Implements urgency selection on meldingen (values: -1, 0, 1).

  • Adds column + check constraint + migration
  • Exposes in create/update/retrieve/list endpoints
  • Adds/updates tests for defaulting, validation, and PATCH behavior

Copilot AI review requested due to automatic review settings March 9, 2026 14:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an urgency attribute to meldingen (allowed values -1/0/1) and wires it through persistence, API I/O, and tests so callers can set it and get it back consistently.

Changes:

  • Add urgency column + DB check constraint (and SQLAlchemy model constraint) with default 0.
  • Expose urgency in API create/update responses and in the output schema.
  • Extend endpoint tests/fixtures to cover defaulting, validation, and PATCH semantics (keep existing urgency when omitted).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/api/v1/endpoints/test_melding.py Adds assertions and new cases covering default urgency, allowed values, and PATCH behavior.
tests/api/v1/endpoints/conftest.py Extends the melding fixture with an optional melding_urgency param to support new tests.
migrations/versions/7a9f5e2e9d1b_melding_urgency.py Adds urgency column with default + check constraint and supports downgrade.
meldingen/schemas/output_factories.py Includes urgency in create/update/retrieve/list output construction.
meldingen/schemas/output.py Adds urgency to the API output schema.
meldingen/schemas/input.py Adds urgency to the API input schema with default and constrained values.
meldingen/models.py Adds the ORM column and check constraint for urgency.
meldingen/api/v1/endpoints/melding.py Uses exclude_unset=True when dumping input, enabling PATCH to avoid overwriting existing urgency when omitted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ramonavic
ramonavic previously approved these changes Mar 10, 2026
@joeyamst joeyamst enabled auto-merge (squash) March 10, 2026 10:30
@joeyamst joeyamst requested a review from ramonavic March 10, 2026 10:30
@joeyamst joeyamst merged commit 642ef2e into main Mar 10, 2026
10 checks passed
@joeyamst joeyamst deleted the feature/7146-urgency-field branch March 10, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants