fix: Exclude tombstones from orphan detection warnings
Orphan detection was reporting tombstoned issues (already deleted) as orphans, causing repeated warnings during sync. Filter out status='tombstone' from the orphan query. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,8 @@ func MigrateOrphanDetection(db *sql.DB) error {
|
||||
(id GLOB '*.[0-9]' OR id GLOB '*.[0-9][0-9]' OR id GLOB '*.[0-9][0-9][0-9]' OR id GLOB '*.[0-9][0-9][0-9][0-9]')
|
||||
-- Parent (remove trailing digits then dot) must not exist
|
||||
AND rtrim(rtrim(id, '0123456789'), '.') NOT IN (SELECT id FROM issues)
|
||||
-- Skip tombstones - they're already deleted
|
||||
AND status != 'tombstone'
|
||||
ORDER BY id
|
||||
`)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user