@Component
@Transactional(propagation = Propagation.REQUIRES_NEW)
class IssueMutations(val issueService: IssueService, val labelService: LabelService, val artefactService: ArtefactService) : Mutation

Contains all issue-related mutations

Parameters

issueService

used for Issue-related mutations

labelService

used for Label-related mutations

artefactService

used for Artefact-related mutations

Constructors

Link copied to clipboard
constructor(issueService: IssueService, labelService: LabelService, artefactService: ArtefactService)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun addAffectedEntityToIssue(input: AddAffectedEntityToIssueInput, dfe: DataFetchingEnvironment): AddedAffectedEntityEvent?

Adds an AffectedByIssue to an Issue, requires MANAGE_ISSUES on any of the Trackables the Issue is on, and AFFECT_ENTITIES_WITH_ISSUES on the Trackable associated with the AffectedByIssue. If the Issue already affects the AffectedByIssue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun addArtefactToIssue(input: AddArtefactToIssueInput, dfe: DataFetchingEnvironment): AddedArtefactEvent?

Adds a Artefact to an Issue, requires MANAGE_ISSUES on any Trackable the issue is on and READ on the Artefact. Additionally, the Artefact must be part of a Trackable the Issue is on. If the Artefact is already on the Issue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun addIssueToPinnedIssues(input: AddIssueToPinnedIssuesInput, dfe: DataFetchingEnvironment): AddedToPinnedIssuesEvent?

Pins an Issue on a Trackable, requires MANAGE_ISSUES on the Trackable the Issue should be pinned on. Additionally, the Issue must already be on the Trackable. If the Issue is already pinned on the Trackable, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun addIssueToTrackable(input: AddIssueToTrackableInput, dfe: DataFetchingEnvironment): AddedToTrackableEvent?

Adds an Issue to a Trackable, requires MANAGE_ISSUES on the Trackable the Issue should be added to, and EXPORT_ISSUES on any Trackable the Issue currently is on. If the Issue is already on the Trackable, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun addLabelToIssue(input: AddLabelToIssueInput, dfe: DataFetchingEnvironment): AddedLabelEvent?

Adds a Label to an Issue, requires MANAGE_ISSUES on any Trackable the issue is on and READ on the Label. Additionally, the Label must be on at least on Trackable the Issue is on. If the Label is already on the Issue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The Trackable to which the Label was added")
suspend fun addLabelToTrackable(input: AddLabelToTrackableInput, dfe: DataFetchingEnvironment): Trackable

Adds a Label to a Trackable, requires MANAGE_LABELS on the Trackable and EXPORT_LABEL on any Trackable the Label is on

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeAssignmentType(input: ChangeAssignmentTypeInput, dfe: DataFetchingEnvironment): AssignmentTypeChangedEvent?

Changes the type of an Assignment, requires MANAGE_ISSUES on any of the Trackables the Issue the Assignment is part of is on. Additionally, if present, the new type must be compatible with the template of the Issue. If the current type of the Assignment is equal to the new one, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssuePriority(input: ChangeIssuePriorityInput, dfe: DataFetchingEnvironment): PriorityChangedEvent?

Changes the `priority` of an Issue requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, the IssuePriority must be defined by the Template of the Issue. If the `priority` is equal to the already existing `priority`, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueRelationType(input: ChangeIssueRelationTypeInput, dfe: DataFetchingEnvironment): OutgoingRelationTypeChangedEvent?

Changes the type of an IssueRelation, requires MANAGE_ISSUES on any of the Trackables the Issue the IssueRelation is part of is on. Additionally, if present, the new type must be compatible with the template of the Issue. If the current type of the IssueRelation is equal to the new one, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueState(input: ChangeIssueStateInput, dfe: DataFetchingEnvironment): StateChangedEvent?

Changes the `state` of an Issue requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, the IssueState must be defined by the Template of the Issue. If the `state` is equal to the already existing `state`, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueTemplate(input: ChangeIssueTemplateInput, dfe: DataFetchingEnvironment): TemplateChangedEvent?

Changes the Template of an Issue. Requires MANAGE_ISSUES on any of the Trackables the Issue is on. Incompatible old values of type, state, priority, templated fields, and priorities of Assignments and outgoing IssueRelations are updated with provided new values, requires that those new values are compatible with the new template. If the old value already is compatible with the new template, fields are not changed! In case of priority and types of Assignments and outgoing IssueRelations, if the old value is incompatible and no new value was provided, the old value is removed. Only creates an event if the new template is not equal to the current template. Events for other changes can be found in the childItems of the returned event.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueTemplatedField(input: ChangeIssueTemplatedFieldInput, dfe: DataFetchingEnvironment): TemplatedFieldChangedEvent?

Changes the value of a templated field on an Issue, requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, the field with the name must be defined by the template of the Issue, and the provided new value must be compatible. If the new value is equal to the current value of the templated field, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueTitle(input: ChangeIssueTitleInput, dfe: DataFetchingEnvironment): TitleChangedEvent?

Changes the `title` of an Issue requires MANAGE_ISSUES on any of the Trackables the Issue is on. If the `title` is equal to the already existing `title`, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun changeIssueType(input: ChangeIssueTypeInput, dfe: DataFetchingEnvironment): TypeChangedEvent?

Changes the `type` of an Issue requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, the IssueType must be defined by the Template of the Issue. If the `type` is equal to the already existing `type`, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created Artefact")
suspend fun createArtefact(input: CreateArtefactInput, dfe: DataFetchingEnvironment): Artefact

Creates a new Artefact on a Trackable. Requires MANAGE_ARTEFACTS on the provided Trackable.

Link copied to clipboard
@AutoPayloadType(description = "The created Assignment")
suspend fun createAssignment(input: CreateAssignmentInput, dfe: DataFetchingEnvironment): Assignment

Assigns a User to an Issue by creating an Assignment, requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, if present, the type must be compatible with the template of the Issue.

Link copied to clipboard
@AutoPayloadType(description = "The created Issue")
suspend fun createIssue(input: CreateIssueInput, dfe: DataFetchingEnvironment): Issue

Creates a new Issue on at least one Trackable, requires CREATE_ISSUES on all Trackables it should be created on. Additionally, checks that the `type`, `state` and `templatedFields` are compatible with the `template`.

Link copied to clipboard
@AutoPayloadType(description = "The created IssueComment")
suspend fun createIssueComment(input: CreateIssueCommentInput, dfe: DataFetchingEnvironment): IssueComment

Creates an IssueComment, requires COMMENT on any of the Trackables the Issue is on. Requires READ on referenced Artefacts, additionally, those must be part of a Trackable the Issue is on. If present, the Comment it answers must be on the same Issue.

Link copied to clipboard
@AutoPayloadType(description = "The created IssueRelation")
suspend fun createIssueRelation(input: CreateIssueRelationInput, dfe: DataFetchingEnvironment): IssueRelation

Creates an IssueRelation, requires MANAGE_ISSUES on any of the Trackables the Issue is on. Additionally, if present, the type must be compatible with the template of the Issue.

Link copied to clipboard
@AutoPayloadType(description = "The created Label")
suspend fun createLabel(input: CreateLabelInput, dfe: DataFetchingEnvironment): Label

Creates a new Label on at least one Trackable. Requires MANAGE_LABELS on all provided Trackables.

Link copied to clipboard
suspend fun deleteArtefact(input: DeleteNodeInput, dfe: DataFetchingEnvironment): DeleteNodePayload

Deletes the Artefact, requires MANAGE_ARTEFACTS on the Trackable it is part of. Removes it from all Issues.

Link copied to clipboard
suspend fun deleteIssue(input: DeleteNodeInput, dfe: DataFetchingEnvironment): DeleteNodePayload

Deletes the specified Issue, requires MODERATOR on all of the Trackables the Issue is on.

Link copied to clipboard
@AutoPayloadType(description = "The updated IssueComment")
suspend fun deleteIssueComment(input: DeleteNodeInput, dfe: DataFetchingEnvironment): IssueComment

Deletes an IssueComment. If the user created the IssueComment, requires READ on any of the Trackables the Issue is on. Otherwise, requires MODERATOR on any of the Trackables the Issue is on. The IssueComment then is marked as deleted, its body set to "", and the referenced Artefacts are cleared. It is no longer possible to update the IssueComment.

Link copied to clipboard
suspend fun deleteLabel(input: DeleteNodeInput, dfe: DataFetchingEnvironment): DeleteNodePayload

Deletes the Label, requires MANAGE_LABELS on all Trackables it is on. Removes it from all Issues. Note that the Label will still be visible in the timeline of Issues.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeAffectedEntityFromIssue(input: RemoveAffectedEntityFromIssueInput, dfe: DataFetchingEnvironment): RemovedAffectedEntityEvent?

Removes an AffectedByIssue from an Issue, requires MANAGE_ISSUES on any of the Trackables the Issue is on, or AFFECT_ENTITIES_WITH_ISSUES on the Trackable associated with the AffectedByIssue. If the Issue does not affect the AffectedByIssue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeArtefactFromIssue(input: RemoveArtefactFromIssueInput, dfe: DataFetchingEnvironment): RemovedArtefactEvent?

Removes a Artefact from an Issue, requires MANAGE_ISSUES on any Trackable the issue is on. If the Artefact is not on the Issue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeAssignment(input: RemoveAssignmentInput, dfe: DataFetchingEnvironment): RemovedAssignmentEvent?

Removes an Assignment from an Issue, require MANAGE_ISSUES on any of the Trackables the Issue the Assignment is part of is on. If the Assignment was already removed, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeIssueFromPinnedIssues(input: RemoveIssueFromPinnedIssuesInput, dfe: DataFetchingEnvironment): RemovedFromPinnedIssuesEvent?

Unpins the Issue on a Trackable, requires MANAGE_ISSUES on the Trackable where the Issue should be unpinned. If the Issue is not pinned on the Trackable, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeIssueFromTrackable(input: RemoveIssueFromTrackableInput, dfe: DataFetchingEnvironment): RemovedFromTrackableEvent?

Removes an Issue from a Trackable, requires MANAGE_ISSUES on the Trackable where the Issue should be removed from. Additionally requires that the Issue is on at least one Trackable afterwards. If the Issue is not on the Trackable, no event is created. Also removes any Artefacts, Labels and AffectedByIssue which cannot be any more on the Issue, and unpins the issue on the defined Trackable if it was pinned. The created events can be found in the childItems of the returned RemovedFromTrackableEvent.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeIssueRelation(input: RemoveIssueRelationInput, dfe: DataFetchingEnvironment): RemovedOutgoingRelationEvent?

Removes an IssueRelation from an Issue, require MANAGE_ISSUES on any of the Trackables the Issue the IssueRelation starts at is on. If the IssueRelation was already removed, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The created event, if present")
suspend fun removeLabelFromIssue(input: RemoveLabelFromIssueInput, dfe: DataFetchingEnvironment): RemovedLabelEvent?

Removes a Label from an Issue, requires MANAGE_ISSUES on any Trackable the issue is on. If the Label is not on the Issue, no event is created.

Link copied to clipboard
@AutoPayloadType(description = "The Trackable from which the Label was removed")
suspend fun removeLabelFromTrackable(input: RemoveLabelFromTrackableInput, dfe: DataFetchingEnvironment): Trackable

Removes a Label from a Trackable, requires MANAGE_LABELS on the Trackable. Removes the Label from all Issues where the Label cannot be anymore, as the Trackable of the Label and the Issue are now disjoint.

Link copied to clipboard
@AutoPayloadType(description = "The updated Artefact")
suspend fun updateArtefact(input: UpdateArtefactInput, dfe: DataFetchingEnvironment): Artefact

Updates the specified Artefact, requires MANAGE_ARTEFACTS on the Trackable the Artefact is part of

Link copied to clipboard
@AutoPayloadType(description = "The updated Body")
suspend fun updateBody(input: UpdateBodyInput, dfe: DataFetchingEnvironment): Body

Updates an IssueComment. If the user created the IssueComment, requires READ on any of the Trackables the Issue is on. Otherwise, requires MODERATOR on any of the Trackables the Issue is on.

Link copied to clipboard
@AutoPayloadType(description = "The updated IssueComment")
suspend fun updateIssueComment(input: UpdateIssueCommentInput, dfe: DataFetchingEnvironment): IssueComment

Updates an IssueComment. If the user created the IssueComment, requires READ on any of the Trackables the Issue is on. Otherwise, requires MODERATOR on any of the Trackables the Issue is on. Requires READ on referenced Artefacts, additionally, added ones must be part of a Trackable the Issue is on.

Link copied to clipboard
@AutoPayloadType(description = "The updated Label")
suspend fun updateLabel(input: UpdateLabelInput, dfe: DataFetchingEnvironment): Label

Updates the specified Label, requires MANAGE_LABELS on any Trackable the Label is on