The display title/summary of the activity
The type of activity (Note, Task, or Event)
The actor assigned to this activity.
For actions (tasks):
assignee: nullassignee: null for unassigned itemsFor notes and events: Assignee is optional and typically null.
// Create action assigned to twist owner (default behavior)
const task: NewActivity = {
type: ActivityType.Action,
title: "Follow up on email"
// assignee omitted → defaults to twist owner
};
// Create UNASSIGNED action (for backlog items)
const backlogTask: NewActivity = {
type: ActivityType.Action,
title: "Review PR #123",
assignee: null // Explicitly set to null
};
// Create action with explicit assignee
const assignedTask: NewActivity = {
type: ActivityType.Action,
title: "Deploy to production",
assignee: {
id: userId as ActorId,
type: ActorType.User,
name: "Alice"
}
};
Timestamp when the activity was marked as complete. Null if not completed.
Start time of a scheduled activity. Notes are not typically scheduled unless they're about specific times. For recurring events, this represents the start of the first occurrence. Can be a Date object for timed events or a date string in "YYYY-MM-DD" format for all-day events.
Activity Scheduling States (for Actions):
start defaults to current timestart to a future Date or date stringstart: nullImportant for synced tasks: When syncing unassigned backlog items from external systems,
set BOTH start: null AND assignee: null to create unscheduled, unassigned actions.
// "Do Now" - assigned to twist owner, actionable immediately
await this.tools.plot.createActivity({
type: ActivityType.Action,
title: "Urgent task"
// start omitted → defaults to now
// assignee omitted → defaults to twist owner
});
// "Do Later" - scheduled for a specific time
await this.tools.plot.createActivity({
type: ActivityType.Action,
title: "Future task",
start: new Date("2025-02-01")
});
// "Do Someday" - unassigned backlog item (common for synced tasks)
await this.tools.plot.createActivity({
type: ActivityType.Action,
title: "Backlog task",
start: null, // Explicitly unscheduled
assignee: null // Explicitly unassigned
});
End time of a scheduled activity. Notes are not typically scheduled unless they're about specific times. For recurring events, this represents the end of the first occurrence. Can be a Date object for timed events or a date string in "YYYY-MM-DD" format for all-day events. Null for tasks or activities without defined end times.
For recurring activities, the last occurrence date (inclusive). Can be a Date object, date string in "YYYY-MM-DD" format, or null if recurring indefinitely. When both recurrenceCount and recurrenceUntil are provided, recurrenceCount takes precedence.
For recurring activities, the number of occurrences to generate. Takes precedence over recurrenceUntil if both are provided. Null for non-recurring activities or indefinite recurrence.
The priority context this activity belongs to
Recurrence rule in RFC 5545 RRULE format (e.g., "FREQ=WEEKLY;BYDAY=MO,WE,FR")
Array of dates to exclude from the recurrence pattern
Array of additional occurrence dates to include in the recurrence pattern
For recurring event exceptions, points to the root recurring activity. Used when an individual occurrence of a recurring event is modified.
For recurring event exceptions, the original occurrence date being overridden. Used to identify which occurrence of a recurring event this exception replaces.
Metadata about the activity, typically from an external system that created it
Canonical URL for the item in an external system. For example, https://acme.atlassian.net/browse/PROJ-42 could represent a Jira issue. When set, it uniquely identifies the activity within a priority tree.