Linked defect subtasks not synchronizing correctly between test execution and defect tracking projects

Our QA team uses a cross-project setup where tests run in PROJECT-QA and defects are logged in PROJECT-DEV. When testers create defects from failed test executions, we use automation to sync the defect subtasks back to the test execution issue for diagnostic context.

The sync works for the parent defect but subtasks created in PROJECT-DEV aren’t appearing as linked subtasks under the test execution in PROJECT-QA. We’re using Jira DC’s built-in automation with the “Create linked issue” action:

{
  "project": "PROJECT-QA",
  "issuetype": "Subtask",
  "parent": {{triggerIssue.key}}
}

The subtasks get created but they’re orphaned - not showing in the test execution’s subtask list. We’re losing diagnostic details like error logs and screenshots that testers attach to defect subtasks. Is there a way to properly mirror subtask relationships across projects?

You’ll need to create corresponding issue types in PROJECT-QA or map to a generic “Diagnostic” type. We use custom field mappings to preserve the original type information. For example, we have a select field called “Diagnostic Type” with values matching the DEV subtask types, then set that field during the sync. This way reports can still filter by the original type even though it’s technically a different issue type in QA.

Another approach is to keep everything in PROJECT-DEV and just link the test execution to the defect. Then configure PROJECT-QA to show linked issues from DEV including their subtasks. You can use issue navigator or a dashboard gadget to display the full defect hierarchy from the QA project view.

That makes sense about the cross-project limitation. How do you handle the issue type mapping though? The subtasks in PROJECT-DEV have specific types like “Error Log” and “Screenshot” that don’t exist in PROJECT-QA. Do you create matching issue types or map them to a generic type?

Here’s the complete solution we implemented for cross-project test-to-defect synchronization:

Understanding the Cross-Project Limitation: Jira’s subtask architecture requires parent and child to be in the same project. You cannot create subtasks in PROJECT-QA with a parent issue in PROJECT-DEV. This is a fundamental constraint of Jira’s data model, not a configuration issue.

Issue Type Mapping Strategy: Create corresponding issue types in PROJECT-QA that mirror your PROJECT-DEV subtask types (Error Log, Screenshot, Environment Detail, etc.). Alternatively, use a generic “Diagnostic” issue type with a custom field “Original Type” to preserve the semantic meaning. The automation rule maps between these during sync:

{
  "project": "PROJECT-QA",
  "issuetype": "Diagnostic",
  "customfield_10050": {{issue.issueType.name}},
  "summary": "[{{issue.issueType.name}}] {{issue.summary}}"
}

Parent-Child Relationship Preservation: Instead of trying to recreate subtasks, create regular issues in PROJECT-QA and link them to the test execution using a custom link type called “has diagnostic” or “documents”. The automation rule triggers when subtasks are created under defects in PROJECT-DEV:


Trigger: Issue Created
Condition: Issue Type = Subtask AND Parent Issue Type = Bug
Action: Create Linked Issue (in PROJECT-QA, linked to related test execution)

Custom Field Mappings for Test Metadata: Copy critical fields from the DEV subtask to the QA diagnostic issue. Key fields to map:

  • Description and attachments (screenshots, logs)
  • Test execution ID or key (to find the correct parent)
  • Timestamp and environment details
  • Severity or priority if applicable

Use the “Edit Issue” action after creation to copy these fields. Attachments require a separate action or script to transfer.

Validation Strategy with Sample Defects: Test the sync with representative scenarios:

  1. Create a defect with 3 subtasks (screenshot, error log, environment) in PROJECT-DEV
  2. Verify 3 diagnostic issues appear in PROJECT-QA linked to the test execution
  3. Confirm attachments and custom fields transferred correctly
  4. Check that updates to DEV subtasks trigger updates to QA diagnostics (if bidirectional sync needed)

For bidirectional sync, add a second automation rule that triggers on subtask updates and propagates changes to the linked QA diagnostic issue. Use smart values to prevent infinite loops: {{issue.changelog.items.first.toString}} to check if the update came from automation.

Alternative Architecture: If preserving the exact hierarchy is critical, consider consolidating into a single project or using Jira’s project linking features to display cross-project hierarchies in reports and dashboards. Some teams use Structure or other hierarchy apps to visualize relationships across project boundaries without actual subtask creation.

The issue is that you’re trying to create subtasks in PROJECT-QA with a parent from PROJECT-DEV. Jira doesn’t allow cross-project parent-child relationships for subtasks. You need to either create regular issues with links, or copy the subtask content into the test execution issue as comments or attachments.

We solved this by creating regular issues in PROJECT-QA instead of subtasks, then linking them to the test execution with a custom link type called “diagnostic detail”. The automation rule creates these linked issues and copies over the key fields like description, attachments, and labels. It’s not a perfect parent-child hierarchy but it preserves the relationship and makes the diagnostic info visible.