Running Your First Sync
This guide walks you through running your first sync, verifying the results, and understanding common workflows.
Before You Start
Ensure you have completed:
- Prerequisites - System requirements and credentials
- Quick Start OR Manual Setup - Configuration setup
- Configuration validation passed:
pnpm run validate-config
Understanding Sync Modes
The connector has two sync modes:
Dry-Run Mode (Safe)
pnpm run dev -- --dry-run
What it does:
- Fetches issues from JPD
- Fetches existing issues from GitHub
- Calculates what would be created/updated
- Shows detailed output of planned changes
- Does not make any actual changes
When to use:
- Before every real sync (recommended)
- After configuration changes
- To preview what will happen
- When testing new field mappings
Actual Sync Mode
pnpm run dev
What it does:
- Fetches issues from JPD
- Fetches existing issues from GitHub
- Creates new GitHub issues
- Updates existing GitHub issues
- Syncs status changes
- Syncs comments (if enabled)
- Makes real changes to GitHub and potentially JPD
When to use:
- After dry-run looks correct
- In production/automated workflows
- When you're confident in your configuration
Step 1: Run Your First Dry-Run
Always start with a dry-run:
pnpm run dev -- --dry-run
What to Look For
Issue Count:
Found 15 issues in JPD project MTT
Found 3 existing GitHub issues
Planned Actions:
Would create 12 new GitHub issues:
- MTT-1: [EPIC] Mobile App Redesign
- MTT-2: [STORY] Implement New Navigation
...
Would update 3 existing GitHub issues:
- #45 (MTT-5): Status changed
- #46 (MTT-7): Labels updated
...
Field Mappings: Check that fields are being mapped correctly:
MTT-1 would be created with:
Title: [MTT-1] Mobile App Redesign
Labels: type:epic, theme:mobile, priority:high
Body: (rendered from template)
Common Dry-Run Issues
No issues found:
- Check your JQL query in config
- Verify project key is correct
- Ensure issues exist in JPD
Fields not mapping:
- Verify field IDs in config match
discover-fieldsoutput - Check field paths are correct (e.g.,
fields.customfield_10001.value)
Labels look wrong:
- Check template syntax
- Verify filters are applied correctly (lowercase, slugify, etc.)
Step 2: Review the Output
Dry-run output is organized into sections:
Connection Status
Connecting to JPD: https://company.atlassian.net
Connecting to GitHub: owner/repo
Verify URLs and repository are correct.
Fetched Issues
Fetched 15 issues from JPD
Fetched 3 existing GitHub issues
Check:
- Issue count matches expectations
- Existing GitHub issues are recognized
Sync Plan
Plan:
Create: 12 new issues
Update: 3 existing issues
Skip: 0 issues
Check:
- Create count seems reasonable
- Update count makes sense
- No unexpected skips
Issue Details
For each issue, review:
Title formatting:
[MTT-1] Mobile App Redesign Initiative
Labels:
Labels: type:epic, theme:mobile-experience, priority:high
Body content: Check that custom fields are rendering correctly in the issue body.
Step 3: Run the Actual Sync
When dry-run looks good, run the real sync:
pnpm run dev
What Happens
The sync executes in phases:
Phase 1: Fetch Data
Fetching JPD issues...
Fetching GitHub issues...
Phase 2: Create New Issues
Creating issue for MTT-1...
✓ Created GitHub issue #50
Creating issue for MTT-2...
✓ Created GitHub issue #51
Phase 3: Update Existing Issues
Updating issue #45 (MTT-5)...
✓ Updated status to 'open'
✓ Added labels: priority:high
Phase 4: Sync Metadata
Updating sync metadata...
✓ Saved sync state
Monitoring Progress
The sync provides real-time feedback:
- Spinner while fetching data
- Progress for each issue created/updated
- Success/error indicators
- Final summary
Step 4: Verify Results in GitHub
Open your GitHub repository and verify:
Issue Creation
- Go to
https://github.com/OWNER/REPO/issues - Check that new issues were created
- Verify issue titles match format
Labels
Check that labels are:
- Created with correct names
- Assigned to appropriate issues
- Using configured colors
Issue Content
Open a few issues and verify:
- Title is correct
- Body contains expected fields
- Labels are applied
- Cross-references to JPD are present
Hierarchy (if enabled)
If using sub-issues:
- Parent issues show child count
- Child issues link to parent
- Hierarchy labels are present (
epic:MTT-1, etc.)
Step 5: Test Bidirectional Sync (if enabled)
If you configured bidirectional sync, test the GitHub → JPD flow:
Test Status Sync
- In GitHub: Close an issue that was synced from JPD
- Run sync again:
pnpm run dev - In JPD: Verify the issue status updated to your configured closed status
Test Comment Sync
- In GitHub: Add a comment to a synced issue
- Run sync again:
pnpm run dev - In JPD: Verify the comment appears with attribution
Common Workflows
Daily Sync Workflow
# 1. Validate configuration (quick check)
pnpm run validate-config
# 2. Run dry-run to preview
pnpm run dev -- --dry-run
# 3. If dry-run looks good, sync
pnpm run dev
After Configuration Changes
# 1. Validate new configuration
pnpm run validate-config
# 2. Dry-run to see impact
pnpm run dev -- --dry-run
# 3. Review carefully - field changes may affect many issues
# 4. If safe, proceed with sync
pnpm run dev
Adding New JPD Issues
- Create issue in JPD
- Set status to one that triggers sync (e.g., move to "Ready for Delivery")
- Run sync:
pnpm run dev - Verify issue appears in GitHub
Updating Existing Issues
- Modify issue in JPD (change priority, add fields, etc.)
- Run sync:
pnpm run dev - Verify changes appear in GitHub
Understanding Sync State
The connector maintains sync state to avoid duplicates:
Sync Metadata
Stored in GitHub issue body as HTML comment:
<!-- jpd-sync-metadata
issue_key: MTT-1
sync_hash: abc123def456
last_synced: 2024-12-30T10:30:00Z
-->
This metadata:
- Links GitHub issue to JPD issue
- Detects changes since last sync
- Prevents duplicate issue creation
When Issues are Updated
Issues are updated when:
- JPD issue content changed (detected via hash)
- Status changed in either system
- Comments added in either system
- Field values updated in JPD
When Issues are Skipped
Issues are skipped when:
- Already synced and unchanged
- Status doesn't match sync criteria
- Filtered out by JQL query
- Marked as "do not sync" (if configured)
Troubleshooting
Issues Not Appearing in GitHub
Check:
- Status matches hierarchy criteria (if configured)
- JQL query includes the issue
- No errors in sync output
- Rate limits not exceeded
Debug:
DEBUG=1 pnpm run dev -- --dry-run
Issue Created Multiple Times
Cause: Sync metadata not being saved/read properly
Fix:
- Delete duplicate GitHub issues
- Run sync again - connector should recognize existing issues
- Check issue body contains sync metadata comment
Status Not Syncing Back to JPD
Check:
- Bidirectional sync enabled in config
- GitHub closed status mapped in config
- JPD API permissions allow status updates
Config:
sync:
direction: "bidirectional"
github_closed_status: "Done"
Fields Not Updating
Check:
- Field mapping in config is correct
- JPD field actually changed
- Sync hash changed (indicates update detected)
Debug: Compare sync hashes before and after JPD update
Rate Limit Errors
Symptom:
Rate limit exceeded, retrying in 60s...
Solution:
- Wait for retry (automatic)
- Reduce sync frequency
- Check rate limit status:
pnpm run health-check
Next Steps
Now that your sync is working:
- Configure Field Mappings - Customize field transforms
- Set Up Hierarchy - Enable Epic/Story/Task relationships
- Configure Status Workflows - Customize status mappings
- Enable Comment Sync - Sync team discussions
- Automate Syncs - Set up GitHub Actions
Performance Tips
Optimize Sync Speed
- Use specific JQL to limit issue count
- Enable caching (default)
- Run syncs during off-peak hours
Reduce API Calls
- Don't sync unchanged issues (automatic)
- Cache field discovery results
- Use connection caching
Monitor Health
# Check API rate limits and connection status
pnpm run health-check
The connector only updates changed issues. After the initial full sync, subsequent syncs are much faster as they only process modified issues.
The first sync creates many GitHub issues and labels. Expect 5-10 seconds per issue created due to API rate limits. Subsequent syncs are much faster.