Complete bd-227: Audit status/closed_at inconsistencies
Findings: - 86/93 closed issues (92%) are missing closed_at timestamps - All inconsistencies are historical (old issues bd-1 through bd-93) - No cases of non-closed issues with timestamps Recommendation: Set closed_at = updated_at for affected issues Next: Apply cleanup SQL and add constraint
This commit is contained in:
@@ -112,6 +112,11 @@ func compareIssues(existing, incoming *types.Issue) []string {
|
||||
conflicts = append(conflicts, "estimated_minutes")
|
||||
}
|
||||
|
||||
// Compare ExternalRef (handle nil cases)
|
||||
if !equalStringPtr(existing.ExternalRef, incoming.ExternalRef) {
|
||||
conflicts = append(conflicts, "external_ref")
|
||||
}
|
||||
|
||||
return conflicts
|
||||
}
|
||||
|
||||
@@ -126,6 +131,17 @@ func equalIntPtr(a, b *int) bool {
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// equalStringPtr compares two *string pointers for equality
|
||||
func equalStringPtr(a, b *string) bool {
|
||||
if a == nil && b == nil {
|
||||
return true
|
||||
}
|
||||
if a == nil || b == nil {
|
||||
return false
|
||||
}
|
||||
return *a == *b
|
||||
}
|
||||
|
||||
// ScoreCollisions calculates reference scores for all colliding issues and sorts them
|
||||
// by score ascending (fewest references first). This minimizes the total number of
|
||||
// updates needed during renumbering - issues with fewer references are renumbered first.
|
||||
|
||||
Reference in New Issue
Block a user