Removes a Label from an Issue, returns the created RemovedLabelEvent, or null if the Label was not present on the Issue. Checks the authorization status

Return

the saved created RemovedLabelEvent or null if no event was created

Parameters

authorizationContext

used to check for the required permission

input

defines which Label to remove from which Issue


suspend fun removeLabelFromIssue(issue: Issue, label: Label, atTime: OffsetDateTime, byUser: User): RemovedLabelEvent

Removes a label from an issue at atTime as byUser and adds a RemovedLabelEvent to the timeline. Creates the event even if the label was not on the issue. Only removes the label from the issue if no newer timeline item exists which adds it again. Does not check the authorization status. Does neither save the created RemovedLabelEvent nor the issue. It is necessary to save the issue or returned RemovedLabelEvent afterwards.

Parameters

issue

the Issue where label is removed from

label

the Label to remove

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