Configure Jira Sync
Identifier:configureJiraIcon:
gearshape.fillFile:
Resources/configureJira.js
Opens a configuration form to set up Jira connection settings and sync preferences.
Form Fields
The action presents a form with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
| JIRA URL | String | Yes | Base URL of your Jira instance |
| JIRA Account ID | String | Yes | Your Jira account identifier |
| JIRA API Token | Password | Yes | API token for authentication |
| JQL Query | String | Yes | JQL query to filter issues |
| OmniFocus Tag | String | Yes | Tag name to apply to synced tasks |
| Enable Project Organization | Checkbox | No | Enable parent-child project structure |
| Default Folder for Projects | String | No | Folder path for organizing projects |
| Completed Statuses | String | No | Comma-separated list of completion statuses |
| Dropped Statuses | String | No | Comma-separated list of dropped statuses |
Validation Rules
The action validates inputs before saving:The URL is automatically normalized by removing trailing slashes before saving.
Connection Test
Before saving settings, the action tests the connection:- Authentication using the
/rest/api/3/myselfendpoint - JQL query validity by executing it with
maxResults: 1
Data Storage
Settings and credentials are stored separately:-
Credentials (secure keychain via Credentials API):
-
Settings (Preferences API):
Sync Jira
Identifier:syncJiraIcon:
arrow.triangle.2.circlepathFile:
Resources/syncJira.js
Performs an incremental sync, fetching only issues modified since the last successful sync.
Behavior
-
Validates Configuration
-
Builds Incremental JQL Query
If
lastSyncTimeexists, appends: -
Processes Issues
- Builds task and project indexes for O(1) lookups
- For each issue:
- Finds existing task by
[JIRA-KEY]prefix - If exists: updates task properties and status
- If not exists and status is not completed/dropped: creates new task
- If not exists and status is completed/dropped: skips creation
- Finds existing task by
-
Updates Sync Time
Statistics
The action tracks and reports:- Created: New tasks added
- Updated: Existing tasks modified
- Reopened: Previously completed/dropped tasks marked active
- Completed: Tasks marked complete due to status change
- Skipped: Issues not created because they’re already completed/dropped in Jira
Example Output
Incremental sync does not complete tasks that have been removed from Jira results. Use “Sync Jira Full” for cleanup operations.
Sync Jira Full
Identifier:syncJiraFullIcon:
arrow.triangle.2.circlepath.circle.fillFile:
Resources/syncJiraFull.js
Performs a full refresh sync, fetching all issues matching the base JQL query and cleaning up stale tasks.
Behavior
-
Fetches All Issues
The
fullRefreshflag is set totrue, fetching all matching issues without date filtering. -
Updates Existing Tasks
Same processing logic as incremental sync:
- Update existing tasks
- Create new tasks (if not completed/dropped)
- Skip creation for completed/dropped issues
-
Completes Stale Tasks
Finds tasks that no longer match the JQL query:
Use Cases
- Cleanup: Remove tasks for issues that no longer match your JQL query
- Recovery: Sync all issues after configuration changes
- Initial Setup: First sync after configuring the plugin
- Debugging: Verify complete sync state when troubleshooting
Performance
Full sync fetches all issues matching the JQL query and processes all existing tagged tasks. For large result sets (1000+ issues), this may take several minutes.Both sync actions handle Jira pagination automatically, fetching up to 100 issues per request and following
nextPageToken until isLast is true.