Files
task-stream/libs/api/tracker/domain
Josep Piguillem dfa42a8a1a feat: pinned tickets, at hand on the home page and in search
Each person pins up to 20 tickets from the ticket's page («Fijar»). They
show as a strip under the projects on the home page and in the search
palette before typing. Private and without history, like the views of
«my work» (Mongo `pinned_issues`); tickets in the trash or out of reach
are left out, and when the list is full the unreadable ones are dropped
first.

API: GET /api/me/pins, PUT/DELETE /api/issues/{issue}/pin; GraphQL
myPins, pinIssue, unpinIssue and Issue.pinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:15:28 +02:00
..
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00

api-tracker-domain

El modelo del producto: proyectos, tickets, comentarios y releases.

  • Import: @task-stream/api/tracker/domain
  • Capa: domain · Tags: scope:api-tracker, type:domain

Contenido

  • Agregados event-sourced: Project, Issue, Comment, Release. Validan en sus métodos y cambian de estado en on<Evento>.
  • events/: un fichero por evento (IssueCreatedEvent, IssueStatusChangedEvent…), todos con @AutowiredEvent.
  • Proyectos públicos (Project.isPublic) y borrado: Project.delete (propietario, confirmando la clave), Issue.delete, Release.delete (los usa la cascada); SYSTEM_ACTOR_ID para cambios que no hace una persona.
  • factories/: ProjectFactory, IssueFactory, CommentFactory, ReleaseFactory (@Injectable()).
  • project/project-settings.ts: configuración por proyecto (estados con categoría, transiciones, tipos, áreas), sus valores por defecto, ProjectWorkflow (lo que consultan tickets y queries) y validateProjectSettings (archivar, nunca borrar).
  • read-models/: forma de las vistas de lectura (ProjectReadModel, IssueReadModel…), incluida la línea temporal de los tickets y las estadísticas (analytics.read-model.ts).

Reglas y workflow: API.

Comandos

npx nx lint api-tracker-domain
npx nx test api-tracker-domain    # Jest

Reglas de dependencia entre capas: Arquitectura.