Changes the priority of an Issue, returns the created PriorityChangedEvent or null if the priority was not changed. Checks the authorization status, and check that the new IssuePriority can be used on the Issue

Return

the saved created PriorityChangedEvent or null if no event was created

Parameters

authorizationContext

used to check for the required permission

input

defines the new priority and of which issue to change it


suspend fun changeIssuePriority(issue: Issue, oldPriority: IssuePriority?, newPriority: IssuePriority?, atTime: OffsetDateTime, byUser: User, updateContext: NodeBatchUpdateContext?): PriorityChangedEvent

Changes the priority of an issue at atTime as byUser and adds a PriorityChangedEvent to the timeline. Creates the event even if the priority was not changed. Only changes the priority if no newer timeline item exists which changes it. Does not check the authorization status. Checks that the newPriority can be used on the issue. Does neither save the created PriorityChangedEvent nor the issue. It is necessary to save the issue or returned PriorityChangedEvent afterwards.

Parameters

issue

the Issue where the priority should be changed

oldPriority

the old priority

newPriority

the new priority

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

updateContext

currently unused