Skip to content

DT-165: Add GET /api/project/ticket endpoint with merged discussion - #178

Open
abdotop wants to merge 1 commit into
masterfrom
165-get-apiprojectticketskey-endpoint
Open

abdotop wants to merge 1 commit into
masterfrom
165-get-apiprojectticketskey-endpoint

Conversation

@abdotop

@abdotop abdotop commented Nov 19, 2026

Copy link
Copy Markdown
Member
  • Resolve one ticket by key in any notation (tnt-393, TNT-393, TNT393), or by its exact {source}:{externalId} key when unkeyed
  • Fetch comments() for every linked item in parallel and merge them into one discussion sorted by createdAt, undated comments last
  • Resolve comment authors against the team directory and only expose them as { id, name }, never the raw email, login or Discord id
  • Return 404 when the project or the ticket key is unknown
  • Extract the project access check into withProjectAccess and reuse it for the tables, logs and tickets routes
  • Add tests for the merge order, author resolution, key lookup, the unknown key case and the response shape

- Resolve one ticket by key in any notation (tnt-393, TNT-393, TNT393),
  or by its exact `{source}:{externalId}` key when unkeyed
- Fetch comments() for every linked item in parallel and merge them into
  one discussion sorted by createdAt, undated comments last
- Resolve comment authors against the team directory and only expose
  them as { id, name }, never the raw email, login or Discord id
- Return 404 when the project or the ticket key is unknown
- Extract the project access check into withProjectAccess and reuse it
  for the tables, logs and tickets routes
- Add tests for the merge order, author resolution, key lookup, the
  unknown key case and the response shape
@abdotop abdotop self-assigned this Nov 19, 2026
@abdotop abdotop linked an issue Nov 19, 2026 that may be closed by this pull request
2 tasks

This branch has not been deployed

No deployments
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.

GET /api/project/tickets/{key} endpoint

1 participant