Skip to content

feat(followers): TicketFollower entity + add_follower handler#78

Merged
mpge merged 1 commit into
mainfrom
feat/follower-notifications
Jun 30, 2026
Merged

feat(followers): TicketFollower entity + add_follower handler#78
mpge merged 1 commit into
mainfrom
feat/follower-notifications

Conversation

@mpge

@mpge mpge commented Jun 30, 2026

Copy link
Copy Markdown
Member

Closes #74

Problem

add_follower was whitelisted in WorkflowEngine.ACTION_TYPES but unhandledWorkflowExecutorService's dispatch switch hit the default warn-log, with no followers table.

Change

  • Entity TicketFollower (JPA) + TicketFollowerRepository.
  • Flyway migration V10: escalated_ticket_followers (ticket_id/user_id, unique; user_id VARCHAR for flexible host keys).
  • FollowerRecipients.resolve() (exclude actor + dedup, unit tested).
  • Handler: WorkflowExecutorService now idempotently records a follower for add_follower, with handler tests.

Design note

Spring's notifications resolve no follower recipients of their own, so the package records followers and exposes the resolved recipients for the host to deliver to.

Verification

Local: ./gradlew test checkstyleMain checkstyleTest BUILD SUCCESSFUL (3 new tests; checkstyle warnings are all pre-existing files).

Spring had add_follower whitelisted in WorkflowEngine.ACTION_TYPES but
unhandled (the dispatch switch hit the default warn-log), with no followers
table.

- TicketFollower JPA entity + TicketFollowerRepository.
- Flyway migration V10: escalated_ticket_followers table.
- FollowerRecipients.resolve() (exclude actor + dedup, unit tested).
- WorkflowExecutorService now handles add_follower (idempotently records the
  follower), with handler tests.

Spring resolves no follower recipients in its own notifications, so followers
are recorded and the resolved recipients exposed for the host to deliver to.

Closes #74
@mpge mpge merged commit a496e7d into main Jun 30, 2026
2 checks passed
@mpge mpge deleted the feat/follower-notifications branch June 30, 2026 05:28
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.

Implement ticket followers feature (currently a whitelisted no-op stub)

1 participant