Skip to content

Commit 6269510

Browse files
committed
Add Activity.order
1 parent ac53712 commit 6269510

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

.changeset/spicy-otters-relax.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@plotday/tool-linear": patch
3+
"@plotday/twister": patch
4+
---
5+
6+
Added: Activity.order

tools/linear/src/linear.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ export class Linear extends Tool<Linear> implements ProjectTool {
443443
assignee: assigneeContact ?? null,
444444
done: issue.completedAt ?? issue.canceledAt ?? null,
445445
start: assigneeContact ? undefined : null,
446+
order: issue.sortOrder,
446447
meta: {
447448
linearId: issue.id,
448449
projectId,
@@ -481,6 +482,11 @@ export class Linear extends Tool<Linear> implements ProjectTool {
481482
updateFields.title = activity.title;
482483
}
483484

485+
// Handle order -> sortOrder
486+
if (activity.order !== undefined && activity.order !== null) {
487+
updateFields.sortOrder = activity.order;
488+
}
489+
484490
// Handle assignee - map Plot actor to Linear user via email lookup
485491
const currentAssigneeActorId = activity.assignee?.id || null;
486492

@@ -718,6 +724,7 @@ export class Linear extends Tool<Linear> implements ProjectTool {
718724
? new Date(issue.canceledAt)
719725
: null,
720726
start: assigneeContact ? undefined : null,
727+
order: issue.sortOrder,
721728
meta: {
722729
linearId: issue.id,
723730
projectId,

twister/src/plot.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ type ActivityFields = ActivityCommon & {
541541
recurrenceExdates: Date[] | null;
542542
/** Metadata about the activity, typically from an external system that created it */
543543
meta: ActivityMeta | null;
544+
/** Sort order for the activity (fractional positioning) */
545+
order: number;
544546
};
545547

546548
export type Activity = ActivityFields &
@@ -946,6 +948,7 @@ export type ActivityUpdate = (
946948
| "private"
947949
| "archived"
948950
| "meta"
951+
| "order"
949952
| "recurrenceRule"
950953
| "recurrenceExdates"
951954
| "recurrenceUntil"

0 commit comments

Comments
 (0)