private suspend fun updateTemplatedFieldsAfterTemplateUpdate(issue: Issue, event: TemplateChangedEvent, templatedFields: List<JSONFieldInput>, atTime: OffsetDateTime, byUser: User)
Updates templated fields on issue after a template update, uses templatedFields for new values for currently incompatible fields and removes fields which are no longer defined by the template. 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
templatedFields
new values for templated fields to update currently incompatible fields
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