MCPcopy Create free account
hub / github.com/simstudioai/sim / buildTaskContent

Function buildTaskContent

apps/sim/connectors/asana/asana.ts:86–106  ·  view source on GitHub ↗

* Builds a formatted text document from an Asana task.

(task: AsanaTask)

Source from the content-addressed store, hash-verified

84 * Builds a formatted text document from an Asana task.
85 */
86function buildTaskContent(task: AsanaTask): string {
87 const parts: string[] = []
88
89 parts.push(task.name || 'Untitled')
90
91 if (task.assignee?.name) parts.push(`Assignee: ${task.assignee.name}`)
92
93 parts.push(`Completed: ${task.completed ? 'Yes' : 'No'}`)
94
95 const tagNames = task.tags?.map((t) => t.name).filter(Boolean)
96 if (tagNames && tagNames.length > 0) {
97 parts.push(`Labels: ${tagNames.join(', ')}`)
98 }
99
100 if (task.notes) {
101 parts.push('')
102 parts.push(task.notes)
103 }
104
105 return parts.join('\n')
106}
107
108/**
109 * Fetches all project GIDs in a workspace, used when no specific project is configured.

Callers 1

asana.tsFile · 0.85

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected