Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ export function inferMemberOrganizationStintChanges(
return false
}

// Wide umbrella orgs that fully wrap the neighbor are concurrent, not career breaks
if (s.dateStart <= neighbor.dateStart && s.dateEnd >= neighbor.dateEnd) {
return false
}

const overlapStart = s.dateStart > gapStart ? s.dateStart : gapStart
const overlapEnd = s.dateEnd < gapEnd ? s.dateEnd : gapEnd
if (overlapStart >= overlapEnd) return false

// Wrapping orgs were already concurrent, so need >90d (vs >30d) to separate
const isUmbrella = s.dateStart <= neighbor.dateStart && s.dateEnd >= neighbor.dateEnd
const threshold = isUmbrella ? 90 : 30

return overlapStart < overlapEnd && diff(overlapStart, overlapEnd) > 30
return diff(overlapStart, overlapEnd) > threshold
})

if (hasSeparator) {
Expand Down
Loading