I’ll address all three aspects of this traceability issue:
Bulk Operation Link Preservation:
The root cause is likely a workflow transition being triggered during your bulk edit. When you bulk-change certain fields (priority, labels, custom fields), Jira may execute workflow transitions in the background. Check your workflow for the Requirements issue type - look for any automatic transitions or post-functions that execute on field updates.
To verify this, enable workflow logging and perform a small bulk edit on 2-3 requirements while monitoring the logs:
log4j.logger.com.atlassian.jira.workflow=DEBUG
log4j.logger.com.atlassian.jira.issue.link=DEBUG
This will show you if links are being deleted during transition execution.
Custom Issue Type Relationships:
Your custom link type configuration looks correct, but Jira 8 has a known issue where custom issue link types can be affected by workflow post-functions that use the ‘Clear Field Value’ function. Check all post-functions in your Requirements workflow for any that clear fields or reset issue state. Even if they don’t explicitly target links, some poorly configured post-functions can inadvertently affect link data.
To protect your custom links during bulk operations, consider using the REST API instead:
PUT /rest/api/2/issue/{issueKey}
Body: {"fields": {"priority": {"name": "High"}}}
This approach updates fields without triggering workflow transitions that might clear links.
Traceability Audit Trail Management:
Implement proper audit logging for link changes. In Administration → System → Audit Log, ensure issue link events are being captured. Then create a scheduled script to periodically export link relationships to a backup table or external system.
For immediate recovery, check your database backup. Issue links are stored in the issuelink table. If you have a recent backup from before the bulk operation, you can identify the deleted links:
SELECT linktype, source, destination
FROM issuelink
WHERE linktype IN (SELECT ID FROM issuelinktype WHERE linkname='tests')
Compare this with your current database to identify missing links, then restore them via REST API.
Long-term Solution:
Review your Requirements workflow and remove any post-functions that might affect issue data beyond their intended scope. Add a workflow validator to prevent bulk operations from triggering problematic transitions. Consider implementing a pre-bulk-operation backup script that exports all traceability links before major bulk changes, giving you a quick restoration path if links are lost again.