private suspend fun updateIssueRelationsAfterTemplateUpdate(issue: Issue, event: TemplateChangedEvent, issueRelationTypeMapping: Map<IssueRelationType, IssueRelationType?>, atTime: OffsetDateTime, byUser: User)

Updates types of IssueRelation on issue where the old type is incompatible with the new template of issue based on issueRelationTypeMapping and removes types with no replacement. Adds the crated events to childItems on event

Parameters

issue

the Issue of which the template was updated

event

the event representing the template update

issueRelationTypeMapping

used to map old IssueRelationTypes to new IssueRelationTypes

atTime

the point in time when the modification happened, updates Issue.lastUpdatedAt if necessary

byUser

the User who caused the update, updates Issue.participants if necessary