Changes the template of an Issue, return the created TemplateChangedEvent or null if the Issue was already pinned on the Trackable. Checks the authorization status, checks that all inputs are compatible with the new template.
Return
the saved created TemplateChangedEvent or null if no event was created
Parameters
used to check for the required permission
defines the new IssueTemplate and of which Issue to change it
Changes the template of an Issue, return the created TemplateChangedEvent. Also creates the TemplateChangedEvent if the template of the issue does not change. Uses templatedFields, type, state, priority, assignmentTypeMapping and issueRelationTypeMapping to enforce compatibility with the new template, however only updates fields which are incompatible with the new template. Does not check the authorization status. Checks that all inputs are compatible with the new template, and checks that the templatedFields are valid after the update.
Return
the created TemplateChangedEvent
Parameters
the Issue to update the template of
the old template of the issue
the new template of the issue
values to update incompatible templated fields
new IssueType in case existing one is incompatible
new IssueState in case existing one is incompatible
new IssuePriority in case existing one is incompatible
used to map incompatible AssignmentTypes
used to map incompatible IssueRelationTypes
the point in time when the modification happened, updates Issue.lastUpdatedAt if necessary
the User who caused the update, updates Issue.participants if necessary
context used for the aggregation updater