📘 What you will learn here
On this page you will learn how to set up attachments sync, which copies files between linked work items and removes the copy when the original file is deleted.
This page is for Jira administrators who set up sync rules. You set it up in the Attachments card under Special contents on the Field mapping tab of a sync rule.
Turn on attachments sync
-
Open the sync rule and go to the Field mapping tab.
-
Under Special contents, turn on the Attachments card. It expands to show its settings.
-
Set the Direction.
-
Optional: under Existing attachments, turn on Also sync attachments that already exist.
-
Optional: click Add filter to choose which files sync.
-
Click Save changes.
Settings
|
Setting |
What it does |
Notes |
|---|---|---|
|
Direction |
Source → Target copies files from This Jira site to the other site. Target → Source copies files from the other site to This Jira site. Both directions does both. |
Default: Source → Target. The rule's push or pull must be turned on for the direction to take effect. |
|
Also sync attachments that already exist |
Off: only files added after the two work items were linked are copied. On: files that were already on the work item when it was linked are copied too. |
Default: off. |
|
Added in the last (days) |
Shown when the option above is on. Copies only existing files added within this many days before the work items were linked. Leave it empty (All attachments) to copy all existing files. |
Counted from the time the work items were linked, not from today. A file that was copied is never removed because it gets older. |
|
Filters (optional) |
With no filter, all files sync. With filters, only files that match all of them sync. |
See Filters. |
When attachments sync
Push
To copy file changes right away, turn on these events under Jira events on the Configuration tab:
-
Attachment added
-
Attachment deleted
Every push of a work item also compares all of its files with what was synced before, whatever triggered the push. So a missed file change is caught up the next time the work item syncs.
Pull
Each time the rule pulls, Sync Bridge compares the files on the linked work item on the other site with what was synced before, and adds or deletes files on This Jira site. Pull works only for work items that are already linked.
How copied files appear
-
The file is uploaded with its original file name.
-
The copy is uploaded by the account the connector signs in with when it goes to the other site, and by the Sync Bridge app when it comes to This Jira site.
-
A file is copied once. Attachments that already exist on the other system aren't copied again.
-
With Both directions, a copy isn't copied back to the site it came from.
Size limit
Files larger than 200 MB are always skipped, whatever your filters say. A skipped file isn't reported as a failure.
Filters
Click Add filter and pick a filter. Each filter can be added once. To remove one, click the X next to it.
|
Filter |
Options |
Notes |
|---|---|---|
|
File type |
Only these extensions or Exclude these extensions, then a list of extensions, for example |
Type one or more extensions and press Enter. Extensions aren't case sensitive and a leading dot is ignored. With Only these extensions, files without an extension don't sync. With Exclude these extensions, files without an extension sync. |
|
File size |
Larger than (MB), Smaller than (MB), or both. |
Enter a minimum or maximum size, or remove this filter. Files larger than 200 MB are always skipped. |
|
Uploader |
Only these uploaders or Exclude these uploaders, then people picked with Search for people or paste an account ID. |
Applies only to files copied from This Jira site to the other site. Files pulled from the other site aren't filtered by uploader. Add at least one person, or remove this filter. |
Deletes
|
Change |
Result |
|---|---|
|
The original file is deleted. |
The copy is deleted on the other site. |
|
The original no longer matches the filters, for example after you narrow the File type filter. |
The copy is deleted at the next sync of the work item. |
|
The original falls outside Added in the last (days). |
Nothing. The window only decides which existing files are copied. |
|
A copy is deleted. |
The original isn't changed, and the copy isn't uploaded again. |
Jira files can't be edited, so there are no updates to sync. To replace a file, delete it and add the new one.
Failures
If some files can't be copied or deleted, the attachment part of the sync is recorded as failed in Sync History with the name of each file. Fields and other parts of the sync still run. Files that weren't copied are tried again at the next sync of the work item.