Keep a TickTick project in sync with your Linear issues

By General Input

Every 30 minutes, your assigned Linear issues show up in one TickTick list with matching titles, due dates, and priorities.

Integrations

  • Linear
  • TickTick

Type

Deterministic Code

Categories

  • Engineering
  • Personal Productivity

Every 30 minutes, keep a dedicated TickTick project in sync with the Linear issues assigned to me, so my personal task list always matches my engineering queue. Build this as a deterministic sync: every step is a fixed field mapping over structured data and no judgement or summarization is required.

Trigger: cron, every 30 minutes. The TickTick Open API sends no outgoing webhooks and the sync is anchored on the TickTick side, so this is scheduled rather than event driven.

Configuration I set once: my Linear assignee id, and the name of the TickTick mirror project. If the assignee id is not supplied, resolve it with Linear Get Viewer. Resolve the mirror project id with TickTick List All Projects by matching the configured project name exactly, and stop the run with a clear error if no project matches.

Step 1. Use Linear List Issues to fetch every issue assigned to me that is still unfinished. Filter on assignee id equal to mine, and on state type in backlog, unstarted, started and triage, which are the unfinished workflow state types. Completed and canceled are the finished ones. Page through with Relay cursor pagination, passing pageInfo.endCursor as after while hasNextPage is true, so a long queue is covered fully. For each issue keep the identifier such as ENG-412, the title, the dueDate, and the priority integer.

Step 2. Use TickTick Get Project Data on the mirror project to read its current contents. This returns only undone tasks, which matters here: a finished issue with no counterpart means the mirror task was already completed on an earlier run, so it must be treated as already handled and never recreated. For each returned task, parse the leading Linear identifier out of the title, matching uppercase letters, a hyphen, digits, then a space. Tasks with no leading identifier are ones I manage by hand and must be left untouched.

Step 3. For every unfinished assigned issue with no matching task, create one with TickTick Create Task in the mirror project. Set the title to the identifier, a space, then the issue title, for example "ENG-412 Fix billing webhook retries". Set the due date and priority using the field mappings below.

Step 4. Where a counterpart already exists, use TickTick Update Task to refresh the title, the due date from the issue due date, and the priority. TickTick task updates are a POST to /task/{taskId} and not a PUT, and the request body needs both the task id and the project id. Skip the write when all three fields already match, so a run where nothing changed performs no writes.

Step 5. Build the set of identifiers returned in step 1. Any undone mirror task whose identifier is not in that set no longer belongs on my list, either because the issue reached a completed or canceled state, or because it was reassigned away from me. Mark each of those done with TickTick Complete Task.

Field mappings, applied literally. Title: Linear identifier, a space, then the Linear issue title. Due date: the Linear issue dueDate, formatted for TickTick as ISO 8601 in the form yyyy-MM-dd'T'HH:mm:ssZ; when the issue has no due date, leave the TickTick due date empty. Priority: Linear 1 urgent maps to TickTick 5 high, Linear 2 high maps to TickTick 3 medium, Linear 3 normal maps to TickTick 1 low, and Linear 4 low and Linear 0 no priority both map to TickTick 0 none. TickTick accepts only priority values 0, 1, 3 and 5, since 2 and 4 are unused. TickTick task status is 0 for active and 2 for completed.

Behaviour notes. Linear is the source of truth, so if I edit a mirrored task's title, due date or priority inside TickTick, the next run resets it to match Linear, and that is intended. Check the errors array on every Linear GraphQL response, because Linear can return HTTP 200 with partial errors. Back off and retry on TickTick 429 and 5xx responses. If one task fails to create or update, log it and carry on with the rest rather than aborting the whole run.

Related prompts

Explore more prompts
Catch feature flags that never got switched on in productionWeekly alert noise review board for incident.io on-callMorning triage board for your Kernel browser agent runsTrack every half finished LaunchDarkly rollout in one boardFind the customers stuck contacting support again and againTurn shipped Linear work into Intercom product announcementsVoice agent QA review board for your Hume EVI callsClose the loop between Front tickets and Linear bug fixesOpen a Heroku release war room the moment production looks wrongFind the themes Help Scout tags miss and file them in Linear