Creates a new IssueComment, returns the created IssueComment. Checks the authorization status, and checks that the referenced Artefact can be used on the Issue. Also, checks that the Comment it answers, if present, is on the same Issue

Return

the saved created IssueComment

Parameters

authorizationContext

used to check for the required permission

input

defines the Issue, User and optional IssueRelationType of the IssueRelation


suspend fun createIssueComment(issue: Issue, answers: Comment?, body: String, referencedArtefacts: List<Artefact>, atTime: OffsetDateTime, byUser: User): IssueComment

Creates a new IssueComment on issue at atTime as byUser. Does not check the authorization status. Checks for each Artefact in referencedArtefacts that it is on a Trackable the issue is on. If present, checks that the Comment it answers is on the same issue. Does neither save the created IssueComment nor the issue. It is necessary to save the issue or returned IssueRelation afterwards.

Parameters

issue

the Issue from which the created IssueRelation starts

answers

the Comment the created IssueComment answers

body

the body of the created IssueComment

referencedArtefacts

Artefacts the created IssueComment should reference

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