Skip to Content
Tares

What happens in Tares when a Linear issue is moved out of the project, deleted or archived?

Tares marks the ticket canceled instead of removing it when its Linear issue is moved out of the linked project, deleted or archived. The ticket’s working doc stays reachable, and Tares records an event with the type ticket_removed. If a sync fails, the Tickets page says why and your tickets stay as they were.

How it works

When you link a project to a Linear project, the issues become the project’s tickets. Tares reads them about once a minute and keeps title, status, order and identifier in sync. It only reads from Linear. Sessions create and change tickets in Linear itself.

When an issue leaves the Linear project, Tares reacts the same way in all three cases:

  • The issue is moved to another Linear project.
  • The issue is deleted.
  • The issue is archived.

The ticket does not disappear. It becomes canceled in Tares, so its working doc stays reachable. Tares also records one event on the linear source with event_type set to ticket_removed. The event is keyed by the issue identifier, for example ENG-123.

The payload of the event carries these fields:

  • change
  • ticket
  • project
  • linear_project
  • the Linear issue
  • from and to for a change of value

The event also has the labels ticket (the issue identifier), project (the Tares project) and linear_project. Triggers and agents can react to a ticket_removed event like any other event.

Canceled is also the status Tares gives to issues whose Linear workflow state is canceled or duplicate. Other states map as follows: backlog, unstarted and triage are todo, started is in_progress, and completed is done.

Set it up

You need a linked Linear project to see this behavior. The steps below set it up and let you check it.

  1. Connect Linear in Settings > Linear. One connection serves the whole workspace.
    • On Tares Cloud, click Connect Linear and approve the Tares app in Linear.
    • On your own Tares, paste a personal API key from Linear (Settings, Security and access, Personal API keys). Read access is enough.
  2. Open the project’s Tickets page, click Use a Linear project and pick one. A project that already has tickets of its own cannot be linked. Tares creates the linear source the first time a project is linked.
  3. Check that the Tickets page shows “Tickets live in Linear project …” and when it last synced.
  4. In Linear, move, delete or archive an issue of that project. Within a minute the ticket shows as canceled. Click Sync now on the Tickets page to read at once.
  5. Open the linear source and look at Recent events for the ticket_removed event.

To react to removals, write a trigger on the source. This example shows the shape of a trigger with the keys Tares uses for filters and conditions:

- name: pr-merged sources: [github] filters: - { field: event_type, op: eq, value: pull_request } condition: { aggregate: count, predicate: "> 0", window: 5m } cooldown: 5m

For Linear, point sources at linear and filter on event_type equal to ticket_removed. Read more on the Linear connector page.

If a sync fails, for example because of a revoked key or a Linear project the connection can no longer see, the Tickets page tells you the reason. Connect again in Settings > Linear. To leave Linear behind, click Stop using Linear on the Tickets page.

What you get

  • Removed issues stay visible as canceled tickets, so nothing is lost and the working doc of each ticket stays reachable.
  • A ticket_removed event on the linear source for each issue that leaves the Linear project, so triggers and agents can act on it.
  • A clear failure message on the Tickets page when a sync breaks. Your tickets stay exactly as they were until you fix the connection.
  • A way out: Stop using Linear keeps the tickets as Tares tickets.
  • Other change events too: ticket_created, ticket_renamed, ticket_status and ticket_reordered.

When something else fits

  • If you want Tares tickets that do not depend on an external tracker, keep the project’s tickets in Tares, or use Stop using Linear to keep the current ones as Tares tickets.
  • Tares only reads from Linear, so make edits to issues in Linear itself, or have sessions change them there.

Still stuck? Get help

Last updated on