Removes an Assignment from its Issue, returns the created RemovedAssignmentEvent, or null if the Assignment was already removed from its Issue. Checks the authorization status

Return

the saved created RemovedAssignmentEvent or null if no event was created

Parameters

authorizationContext

used to check for the required permission

input

defines which Assignment to remove


suspend fun removeAssignment(assignment: Assignment, atTime: OffsetDateTime, byUser: User): RemovedAssignmentEvent

Removes an assignment from its Issue at atTime as byUser and adds a RemovedAssignmentEvent to the timeline. Creates the event even if the assignment was already removed from its Issue. Does not check the authorization status. Does neither save the created RemovedAssignmentEvent nor the Issue of the assignment. It is necessary to save the Issue of the assignment or returned RemovedAssignmentEvent afterwards.

Parameters

assignment

the Assignment to remove from its Issue

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