# Teamwork Graph connector

> What Oktul Code Studio sends to Atlassian's Teamwork Graph so Rovo finds your scripts, who can find each one, how it stays in step, and how to remove it.
>
> Documentation for Oktul Code Studio, for Jira Cloud and Confluence Cloud, by Oktul: https://oktul.com/docs/plugins/code-studio/teamwork-graph/

Oktul Code Studio for Jira can put your scripts into Atlassian's Teamwork Graph. Rovo Search, Rovo
Chat and the Rovo agents your organisation builds in Rovo Studio then find a script by its name,
its description or a word in its code, and only people who may see that script in Code Studio find
it.

**Nothing is sent until an organisation admin connects the app.** Without a connection the
connector does nothing.

<Aside type="note" title="Jira only">
Atlassian accepts a Teamwork Graph connector from apps installed into Jira. Oktul Code Studio for
Confluence has no connector.
</Aside>

## Connect

1. In **Atlassian Administration**, open **Apps**, then **Oktul Code Studio**, then **Connections**.
2. Choose **Connect** and give the connection a name. There is nothing else to fill in: the data is
   your site's own.
3. The first sync starts within a minute. In Jira settings, Code Studio's page shows its state on
   the **Rovo and AI** tab: when it last synced, how many scripts the graph holds, and **Sync now**.

## What is sent

One document per script, of Teamwork Graph type `atlassian:document`, category code:

| Field | Taken from |
|---|---|
| Name | The script's file name |
| Description | The script's description, or the first sentence of its doc comment, and its folder path |
| Content | The newest saved draft's code, up to 100,000 characters |
| Language | JavaScript, TypeScript, AssemblyScript or Groovy |
| Created and changed by | The Atlassian account ids Code Studio records |
| Created and changed at | The dates Code Studio records |
| Link | The script in the Code Studio console |

Also sent, so the graph can apply permissions: the developer groups and any group a space's access
names, each with the account ids of its active members as Jira lists them, and each of those account
ids linked to itself.

**Never sent**: run logs and results, connection credentials, variable values (secret or not),
email addresses, and anything a script read from Jira or elsewhere. A script's code and comments
are what your people wrote, so keep personal data, health or financial records out of scripts, as
Atlassian's rules for connectors require.

The data goes from Code Studio, which runs on Atlassian's platform, to the Teamwork Graph through
Atlassian's own API. It does not leave Atlassian.

## Who finds a script

Code Studio's own access rules, restated for the graph:

- **Developers.** A script is visible to members of the developer groups set in Code Studio's
  settings.
- **Spaces.** In a space whose viewers and editors both name somebody, a person must also be one of
  them: in a named group or named themselves. Both conditions must hold.
- **Administrators who are in no developer group do not find scripts in Rovo.** Jira does not list
  its administrators to apps, so the connector cannot name them. They find every script in the
  console, as before.
- **No developer groups set: nothing is published**, and anything published earlier is deleted.
- A script is never shared with everyone on the site.

Rovo applies these rules when it searches. A person removed from a group stops finding the scripts
that group gave them at the next sync, within the hour.

## How it stays in step

- **On every change.** Creating, saving, renaming, moving, describing or deleting a script, changing
  a space's access or the developer groups queues a sync a minute later. A burst of changes is one
  sync.
- **Every hour.** Group membership raises no event an app can hear, so every group is read again
  hourly.
- **Only what changed is sent.** Each script carries a fingerprint; a sync sends the ones that moved
  and deletes the ones that went.
- **A sync that cannot finish takes the scripts it was changing out of the graph** rather than leave
  them on permissions wider than Code Studio's now, and sends them again once it can. The Rovo tab
  says what stopped it. A group Jira no longer has counts as nobody.
- **Atlassian's rate limits** decide the pace: a site with thousands of scripts is synced over
  several minutes.

## Removing the data

- **Disconnect** in Atlassian Administration, under the app's Connections. Atlassian deletes
  everything the connection sent, and Code Studio forgets what it sent.
- **A lapsed licence** stops the app. Within a week Code Studio takes every script out of the graph;
  disconnect to remove them at once.
- **Uninstalling** the app removes its connections, and with them their data.

## Cost

Each sync is Forge compute that Oktul pays for. Atlassian counts what a connector sends towards your
organisation's indexed objects, which Atlassian says is for visibility and does not affect Rovo
credits or billing.

## Related

- [Rovo agents](../rovo/)
- [Security](../security/)
- [Privacy](../privacy/)

---

A problem or a question? Write to [support@oktul.com](mailto:support@oktul.com) or open a request in the [Help Center](https://oktul.atlassian.net/servicedesk/customer/portals). Both open a request with a reference and an SLA.
