Skip to content

AM-834 construction work: add subtypes#210

Open
fhaver-amsterdam wants to merge 3 commits into
mainfrom
construction_work/am-834-add-subtypes
Open

AM-834 construction work: add subtypes#210
fhaver-amsterdam wants to merge 3 commits into
mainfrom
construction_work/am-834-add-subtypes

Conversation

@fhaver-amsterdam

@fhaver-amsterdam fhaver-amsterdam commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Adds explicit subtype support for construction-work notifications and removes the previous enum value “rewriting” behavior, so clients can distinguish notification kinds without relying on legacy type strings. Updates validation/serialization and related tests, plus refreshes dependencies and adds Bruno workspace assets.

Changes:

  • Add context.subtype (article/warning) with conditional validation for construction-work:article-message.
  • Stop overwriting construction-work NotificationType.value to legacy strings and add regression coverage for legacy stored notifications.
  • Update construction_work notification sending to include subtype, and refresh locked/exported dependencies.

Affected services

  • construction_work
  • core
  • notification

Definition of done

  • API is backwards compatible (make openapi-diff)
  • Swagger UI up-to-date & tested (make dev)
  • Dependencies updated (make requirements)
    - [ ] Infrastructure config updated (aapp_azure_infra)
    - [ ] Loadtests for relevant endpoints (aapp_testing_loadtests)

After PR created (and deployed on dev):

  • Manual check on dev (o) e.g. use feature via Swagger or admin panel
  • Sanity check on test app (check that dev environment is selected)

Other notes

GitHub Copilot was used in writing the code

@fhaver-amsterdam
fhaver-amsterdam requested review from a team and Copilot July 16, 2026 12:41
@fhaver-amsterdam fhaver-amsterdam changed the title Construction work/am 834 add subtypes AM-834 onstruction work: add subtypes Jul 16, 2026
@fhaver-amsterdam fhaver-amsterdam changed the title AM-834 onstruction work: add subtypes AM-834 construction work: add subtypes Jul 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds explicit subtype support for construction-work notifications and removes the previous enum value “rewriting” behavior, so clients can distinguish notification kinds without relying on legacy type strings. Updates validation/serialization and related tests, plus refreshes dependencies and adds Bruno workspace assets.

Changes:

  • Add context.subtype (article/warning) with conditional validation for construction-work:article-message.
  • Stop overwriting construction-work NotificationType.value to legacy strings and add regression coverage for legacy stored notifications.
  • Update construction_work notification sending to include subtype, and refresh locked/exported dependencies.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
uv.lock Dependency lockfile updates.
requirements.txt Regenerated pinned requirements export.
notification/tests/views/test_notification_views.py Adds validation + regression tests around construction-work context typing/subtype.
notification/serializers/notification_serializers.py Adds subtype to context serializer and enforces subtype for construction-work:article-message.
core/validators.py Extends JSON schema to allow subtype and require it for construction-work:article-message.
core/tests/test_enums.py Adds test ensuring construction-work notification types are not rewritten.
core/enums.py Removes legacy mapping/rewriting in NotificationType.value.
construction_work/utils/patch_utils.py Updates mocked push payload context to include new type/subtype fields.
construction_work/tests/services/test_notification.py Asserts scheduled notification type/subtype for construction-work warnings.
construction_work/tests/etl/test_send_notification.py Asserts notification type/subtype for construction-work article ETL flow.
construction_work/services/notification.py Builds explicit contexts and sets subtype for article/warning notifications.
.bruno-workspace/collections/Extern/MijnAms/All.yml Adds Bruno request definition for “services/all”.
.bruno-workspace/collections/Extern/environments/A.yml Adds Bruno environment variable placeholder for API key.

Comment thread notification/tests/views/test_notification_views.py Outdated
Comment thread construction_work/services/notification.py
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.

2 participants