# External Work Logs (https://jetheads.io/help-center/fundamentals/jettime/integrations/external-work-logs/)

Work logs reach Jira from more places than JetTime: a sync from another time tracker, a script over the Jira REST API, Jira Automation, or Jira's own **Log work** dialog while JetTime isn't your [time tracking provider](/help-center/fundamentals/jettime/administration/setting-jettime-as-time-tracking-provider-in-jira/). Those tools know nothing of JetTime's fields, so their work logs arrive without JetTime's data: say, with **Billable Time** empty and no account or team.

Work log processing rules fill in that data as each work log is created or edited outside JetTime: say, one rule copies **Regular Time** (Jira's own time spent) into **Billable Time**, and a rule for each client's space sets that client's account. No one has to fix those work logs by hand at month-end.

<BrowserFrame src="/help-center/images/fundamentals/jettime/integrations/external-work-logs/hc-external-work-logs.png" alt="Screenshot of JetTime's External Work Logs settings, with processing rules that fill in billable hours on Jira work logs synced from external tools." width={2800} height={1400} caption="Settings › Work Tracking › External Work Logs — the rules run top to bottom." />

## How It Works [#how-it-works]

A processing rule has three parts:

- **When it runs**. Its triggers: a work log created outside JetTime, edited outside JetTime, or both.
- **Which work logs**. Conditions on the work item's fields, such as its space, work item type, status or a custom field. With no conditions, the rule applies to every work log.
- **What it sets**. Its actions: a time category set to a duration or copied from another category, an account, a team and role, or any [custom work log field](/help-center/fundamentals/jettime/administration/setting-up-custom-work-log-fields/).

Every active rule that matches a work log runs on it, in **Run Order**. A later rule overrides an earlier one on the same field. So separate rules may combine: one copies **Regular Time** into **Billable Time** on every work log, and one per client space sets that client's account. Change the order with **Move Up** and **Move Down** on the **Processing Rules** tab.

## Create a Processing Rule [#create-a-processing-rule]

<Steps>
<Step>
### Create the Rule [!toc] [#create-the-rule-toc]
In the JetTime app, go to **Settings** › **External Work Logs** (under **Work Tracking**), select **Create Processing Rule**, and give the rule a name.
</Step>
<Step>
### Choose the Triggers [!toc] [#choose-the-triggers-toc]
A new rule runs on both **Work Log Created Externally** and **Work Log Edited Externally**. On the **Triggers** tab, clear one to narrow it.

Each tab saves on its own: select **Save** before you move to the next tab.
</Step>
<Step>
### Set the Conditions [!toc] [#set-the-conditions-toc]
On the **Conditions** tab, select **Add Condition** to choose which work logs the rule changes, by their work item: for example **Space** is **Lumen Creative Campaigns**.
</Step>
<Step>
### Add the Actions [!toc] [#add-the-actions-toc]
On the **Actions** tab, select a field in **Add Action**, then set its value. For a time category, select **Set** and enter a duration, or select **Copy From** and pick the category to copy.

<BrowserFrame src="/help-center/images/fundamentals/jettime/integrations/external-work-logs/hc-processing-rule-actions.png" alt="Screenshot of a processing rule's actions in JetTime, filling in billable time and the client's account in Jira to track hours for client invoices." width={2800} height={1400} caption="One rule sets several fields at once." />
</Step>
<Step>
### Check the Status [!toc] [#check-the-status-toc]
A new rule is active from the start and runs on the next work log it matches. To pause it, set **Status** to **Archived** on the **Settings** tab.
</Step>
</Steps>

## Work Logs Created or Edited in JetTime [#work-logs-created-or-edited-in-jettime]

By default, the rules don't change a work log once someone has created or edited it in JetTime. That holds even when an external tool edits the work log later. So a value a person set in JetTime stays as it is: say, billable hours cut before an invoice, or an account picked by hand.

Some setups need the rules on those work logs too: say, an external script rewrites **Regular Time** on work logs people logged in JetTime, and **Billable Time** has to follow. Then open the rule's **Conditions** tab and, under **Options**, set **Work Logs Created or Edited in JetTime** to **Change Work Logs Created or Edited in JetTime**.

## Start with the Demo Rule [#start-with-the-demo-rule]

JetTime comes with one rule set up and archived: **Billable Time from Regular Time (Demo Rule)**. It copies **Regular Time** into **Billable Time** on each work log an external tool creates or edits. To turn it on, open it, set **Status** to **Active** on the **Settings** tab, and select **Save**.

## See What the Rules Changed [#see-what-the-rules-changed]

The **Audit Log** tab on the **External Work Logs** page lists each change the rules made to a work log, with the rules that ran and each field before and after. The [Global Audit Log](/help-center/fundamentals/jettime/administration/audit-log/#view-the-global-audit-log) shows the same entries.

## Good to Know [#good-to-know]

- **Jira's own fields stay as written**. Rules never change **Regular Time**, the date, the author or the description: those belong to the tool that wrote the work log.
- **Rules work from the moment they're active**. Rules don't go back over work logs already in Jira. A rule changes an older work log only when the work log is next edited outside JetTime. For that, the rule needs the **Work Log Edited Externally** trigger. To fix older work logs at once, use **Copy From** in the bulk editor. See [Bulk Editing Work Logs](/help-center/fundamentals/jettime/logging-work/bulk-editing-work-logs/#edit-fields).
- **JetTime's locks don't stop rules**. A rule runs on a work log an external tool has just written. That edit was made outside JetTime, so it never went through JetTime's locks and checks. The processing rule follows it the same way. So a rule can change a figure in a submitted worksheet (what other tools call a timesheet). See [What Gets Locked](/help-center/fundamentals/jettime/work-approvals/introduction-to-work-approvals/#what-gets-locked).
- **Who manages processing rules**. Anyone with the **View and Manage App Settings** or the **Full Access** global permission.
