Overview
The Asana tracker adapter (src/tracker/asana.ts) has a baseline implementation, but several gaps exist compared to the GitHub Projects v2 adapter. This issue tracks the improvements needed.
Tasks
1. Generate Task URLs (url field always null)
Files: src/tracker/asana.ts:148,186 (normalizeAsanaTask, fetchIssueStatesByIds)
Currently the url field is always set to null. Asana task URLs can be constructed from known data:
https://app.asana.com/0/{project_gid}/{task_gid}
The project_gid is available from the tracker config and task_gid is the task's GID. Both normalizeAsanaTask and fetchIssueStatesByIds should populate this field.
2. Parallelize fetchIssueStatesByIds
Files: src/tracker/asana.ts:121-157
Currently performs a sequential per-ID fetch. The GitHub adapter batches all IDs into a single GraphQL nodes(ids:) query. The Asana adapter should use Promise.allSettled or a concurrency-limited parallel fetch to reduce latency.
3. Use asana_missing_next_page Error Code
Files: src/tracker/asana.ts:99, src/tracker/types.ts:17
The asana_missing_next_page error code is defined in the TrackerError union but never emitted. Pagination integrity validation should be added so that if next_page is expected but missing (e.g., truncated response), this error is surfaced.
4. Parallelize Section Fetches in fetchTasks
Files: src/tracker/asana.ts:65-70
Tasks for multiple sections are currently fetched sequentially. Since each section fetch is independent, they can be parallelized using Promise.all to reduce total polling time.
5. Include description in fetchIssueStatesByIds
Files: src/tracker/asana.ts:127
The opt_fields parameter in fetchIssueStatesByIds does not include notes, causing the description field to always be null. Adding notes to opt_fields will ensure description data is returned.
Acceptance Criteria
Overview
The Asana tracker adapter (
src/tracker/asana.ts) has a baseline implementation, but several gaps exist compared to the GitHub Projects v2 adapter. This issue tracks the improvements needed.Tasks
1. Generate Task URLs (
urlfield alwaysnull)Files:
src/tracker/asana.ts:148,186(normalizeAsanaTask,fetchIssueStatesByIds)Currently the
urlfield is always set tonull. Asana task URLs can be constructed from known data:The
project_gidis available from the tracker config andtask_gidis the task's GID. BothnormalizeAsanaTaskandfetchIssueStatesByIdsshould populate this field.2. Parallelize
fetchIssueStatesByIdsFiles:
src/tracker/asana.ts:121-157Currently performs a sequential per-ID fetch. The GitHub adapter batches all IDs into a single GraphQL
nodes(ids:)query. The Asana adapter should usePromise.allSettledor a concurrency-limited parallel fetch to reduce latency.3. Use
asana_missing_next_pageError CodeFiles:
src/tracker/asana.ts:99,src/tracker/types.ts:17The
asana_missing_next_pageerror code is defined in theTrackerErrorunion but never emitted. Pagination integrity validation should be added so that ifnext_pageis expected but missing (e.g., truncated response), this error is surfaced.4. Parallelize Section Fetches in
fetchTasksFiles:
src/tracker/asana.ts:65-70Tasks for multiple sections are currently fetched sequentially. Since each section fetch is independent, they can be parallelized using
Promise.allto reduce total polling time.5. Include
descriptioninfetchIssueStatesByIdsFiles:
src/tracker/asana.ts:127The
opt_fieldsparameter infetchIssueStatesByIdsdoes not includenotes, causing thedescriptionfield to always benull. Addingnotestoopt_fieldswill ensure description data is returned.Acceptance Criteria
urlis populated in bothnormalizeAsanaTaskandfetchIssueStatesByIdsfetchIssueStatesByIdsuses parallel fetchingasana_missing_next_pageerror is emitted on pagination integrity failurefetchTasksrun in parallel viaPromise.allnotesis included inopt_fieldsforfetchIssueStatesByIds