Use case: Unlink a Jira Issue from an Annotation
Before you start
- Verify Permissions: Ensure you have appropriate permissions in both Unity and Jira to unlink issues and access annotations.
- Annotation Must Exist: You need the Unity projectId and annotationId of the annotation you want to unlink.
- Issue Must Exist: The Jira issue must already be linked and accessible through a valid Jira ServerConfig and ProjectConfig.
- Linked Jira Project: Your Unity project must be linked to a Jira ProjectConfig for the operation to work.
- Review Unlink Behavior: Understand how unlinking is reflected in both systems. In Unity, the annotation will no longer show the Jira issue key; in Jira, any backlink or label may be removed depending on implementation.
How do I...?
To unlink a Jira issue from a Unity annotation:
- Ensure All Prerequisites Are Met: Verify that the Unity project and Jira project are correctly configured and linked.
- Get Required IDs: Collect the projectId, annotationId, and the Jira issueId (e.g., BUG-45).
- Use the SDK: Call the
UnlinkIssueFromAnnotationAsyncmethod in the Unity Collaboration SDK with the required properties. - Confirm the Unlink: Ensure the issue key is no longer shown on the annotation or in your application UI.
Example:
await jiraIssueService.UnlinkIssueFromAnnotationAsync(
projectId: projectId,
annotationId: annotationId,
jiraIssueId: jiraIssueId,
cancellationToken: cancellationToken);
Error Handling
- 400 Bad Request: Invalid input.
- 401 Unauthorized: Authentication required.
- 403 Forbidden: Insufficient permissions.